M
Marc
Hello,
the definition of the noexcept operator seems to imply that any call
to a function not explicitly marked as noexcept makes it answer false.
In particular, that would mean that
is_nothrow_copy_constructible < some_POD_type > :: value == false. Or
if I missed a paragraph about that, at least:
void f(){}
assert(noexcept(f())==false);
Is that really the case? Any reason the compiler is forbidden from
proving that f() can't throw when it has the definition at hand?
Also, there are many is_nothrow_* helpers, but not
is_nothrow_swappable. Is it because
noexcept(swap(declval<T&>(),declval<T&>())) is sufficient (several of
the is_nothrow_* helpers seem to have subtleties for arrays of void
that prevent them from being equivalent to a simple noexcept
expression)? I have types that can be move-assigned or swapped without
throwing but for which any constructor may throw, and I fear they will
miss on many optimizations.
the definition of the noexcept operator seems to imply that any call
to a function not explicitly marked as noexcept makes it answer false.
In particular, that would mean that
is_nothrow_copy_constructible < some_POD_type > :: value == false. Or
if I missed a paragraph about that, at least:
void f(){}
assert(noexcept(f())==false);
Is that really the case? Any reason the compiler is forbidden from
proving that f() can't throw when it has the definition at hand?
Also, there are many is_nothrow_* helpers, but not
is_nothrow_swappable. Is it because
noexcept(swap(declval<T&>(),declval<T&>())) is sufficient (several of
the is_nothrow_* helpers seem to have subtleties for arrays of void
that prevent them from being equivalent to a simple noexcept
expression)? I have types that can be move-assigned or swapped without
throwing but for which any constructor may throw, and I fear they will
miss on many optimizations.