Add noexcept specifier to move assignment operator and destructor in Span class

This commit is contained in:
whaffman 2025-08-20 13:13:37 +02:00
parent 8c34d8e696
commit 7d6382d47b

View File

@ -31,7 +31,7 @@ Span &Span::operator=(const Span &other)
return *this;
}
Span &&Span::operator=(Span &&other)
Span &&Span::operator=(Span &&other) noexcept
{
if (this != &other)
{
@ -42,7 +42,7 @@ Span &&Span::operator=(Span &&other)
return std::move(*this);
}
Span::~Span() {}
Span::~Span() noexcept{}
void Span::addNumber(int number)
{