Based on the popular question What is the copy-and-swap idiom?:
Why does the rule of 4.5 not include the move assignment operator (to effectively become the rule of 5.5)? Instead I've read (eg. here What is the Rule of Four (and a half)?) that we either have rule of 4.5 or 5?
Since the
swap
member function isnoexcept
, shouldnt the copy assignment operator also be marked the same (the move constructor can't since it calls the default constructor that can throw)?
dumb_array& operator=(dumb_array other) // should be noexcept?
{
swap(*this, other);
return *this;
}