Le 31/03/13 07:11, Michael Marcin a écrit :
Why isn't BOOST_NOEXCEPT defined to be throw() for msvc?
Microsoft Visual Studio 11.0\VC\include\yvals.h
defines: #define _NOEXCEPT throw ()
and the rest of the standard library implementation uses it
ex. void swap(thread& _Other) _NOEXCEPT { // swap with _Other _STD swap(_Thr, _Other._Thr); }
http://msdn.microsoft.com/en-us/library/wfa0edys.aspx states:
throw() The function does not throw an exception. However, if an exception is thrown out of a function marked throw(), the Visual C++ compiler will not call unexpected (see unexpected (CRT) and unexpected (<exception>) for more information). If a function is marked with throw(), the Visual C++ compiler will assume that the function does not throw C++ exceptions and generate code accordingly. Due to code optimizations that might be performed by the C++ compiler (based on the assumption that the function does not throw any C++ exceptions) if a function does throw an exception, the program may not execute correctly.
It seems a better choice here than expanding BOOST_NOEXCEPT to nothing.
Hi, Could you patch yourself the config file and check that there is no regression on the whole Boost regression tests? Some figures of the performance gain will be welcome. Best, Vicente