noexcept move on containers (e.g. list)

Kenny Simpson theonetruekenny@yahoo.com
Wed Sep 18 04:45:00 GMT 2013


http://channel9.msdn.com/Events/GoingNative/2013/An-Effective-Cpp11-14-Sampler

at 48:40, Scott goes into pointing out that none of the Standard containers are defined as having noexcept move constructors, and that fishing around in the Standard library will show very few noexcept things... but as of current trunk, I do see that many of these noexcept specifiers were added in 2011 (c95bf15b in the git mirror).

STL explains something about why these are not noexcept in the Standard (and presumably also in VC++'s library), but the audio is too low for me to make out what he says.

A Scott stresses that noexcept is a property of the interface, is gcc just taking some freedom in making its implementation more strict than required by the Standard?


which seems fine as of: "17.6.5.12 Restrictions on exception handling
...  An implementation may strengthen the exception-specification
for a non-virtual function by adding a non-throwing noexcept-specification."

-Kenny



More information about the Libstdc++ mailing list