8 Apr
2019
8 Apr
'19
2:07 a.m.
On 8/04/2019 13:53, Peter Dimov wrote:
Gavin Lambert wrote:
Especially when something as simple as accidentally omitting "noexcept" can cause a significant behavioural and storage size change, it's great to be able to tell the compiler that this was unintended.
This is, by the way, already the case with std::vector<X>. It will silently fall back to using the copy constructor if you forget noexcept on the move constructor of X. See f.ex. https://godbolt.org/z/gv1fN5
Just because it's in the Standard doesn't mean that (I think) it's a good design choice. ;)