NoSenseEtAl asked:
Why noexcept is not enforced at compile time?
As you might know C++11 has noexcept keyword. Now ugly part about it is this:
Note that a noexcept specification on a function is not a compile-time check; it is merely a method for a programmer to inform the compiler whether or not a function should throw exceptions.
http://en.cppreference.com/w/cpp/language/noexcept_spec
So is this a design failure on the committee part or they just left it as an exercise for the compile writers in a sense that decent compilers will enforce it, bad ones can still be compliant?
Add a Comment
Comments are closed.