8 Apr
2019
8 Apr
'19
1:53 a.m.
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