On Fri, 20 Sep 2013, Paolo Carlini wrote:

By the way, I would be curious at some point to actually see with my eyes the effect of those optimizations in the assembly: is it easy to produce examples? Even at say -O2?

If you use "if(noexcept(container.shrink_to_fit()))", you can easily cause different code to be used. Now whether for regular code it somehow produces fewer implicit try-catch or some optimization like that, I have no idea. If it ever makes code worse, please beat the core- people who required std::terminate with a screen showing the benchmarks (I keep wanting to introduce -fno-abort -fno-terminate flags to turn those 2 calls into __builtin_unreachable).

Note that I am still a proponent of noexcept(auto), if it can't be the default. If someone feels like implementing it as an extension, we could use it in the library.

--
Marc Glisse

Reply via email to