By specifying noexcept(true)
, you claim that the function never throws exceptions. By specifying noexcept(false)
, or not specifying anything, you do not claim that the function never throws exceptions.
So it's basically your statement (2), but note that for the compiler, that's equivalent to your statement (1). If the compiler is not assured that the function will not throw, it must assume that it can.
The relevant bit of the standard is C++11 15.4/12:
A function with no exception-specification or with an exception-specification of the form noexcept(constant-expression)
where the constant-expression yields false
allows all exceptions. An exception-specification is
non-throwing if it is of the form throw()
, noexcept
, or noexcept(constant-expression)
where the constant-expression
yields true
. A function with a non-throwing exception-specification does not allow any exceptions.
There are only two deviations from that rule. One is destructors—putting no exception specification on a destructor gives the destructor the same exception specification as the default-generated one would have. That is, noexcept(true)
if and only if all functions which would be directly invoked from the default-generated destructor are noexcept(true)
.
The other one are deallocation functions (operator delete
)—a deallocation function without an explicit exception specification is treated as noexcept(true)
.