Boost logo

Boost :

Subject: Re: [boost] [config] BOOST_NOEXCEPT on MSVC
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-03-31 21:54:26


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk