[prev in list] [next in list] [prev in thread] [next in thread]
List: boost
Subject: [boost] [config] BOOST_NOEXCEPT on MSVC
From: Michael Marcin <mike.marcin () gmail ! com>
Date: 2013-03-31 5:11:39
Message-ID: kj8gpj$l3u$1 () ger ! gmane ! org
[Download RAW message or body]
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.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic