From 7d6382d47bd6e6ddaaa0c8be723910bc7ad0be72 Mon Sep 17 00:00:00 2001 From: whaffman Date: Wed, 20 Aug 2025 13:13:37 +0200 Subject: [PATCH] Add noexcept specifier to move assignment operator and destructor in Span class --- ex01/src/Span.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ex01/src/Span.cpp b/ex01/src/Span.cpp index 5f9ffe6..9f6e9df 100644 --- a/ex01/src/Span.cpp +++ b/ex01/src/Span.cpp @@ -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) {