For the following code
struct X
{
int x;
X() noexcept try : x(0)
{
}
catch(...)
{
}
};
Visual studio 14 CTP issues the warning
warning C4297: 'X::X': function assumed not to throw an exception but does
note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function
Is this a misuse of noexcept
? Or is it a bug in Microsoft compiler?