https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86044

Casey Carter <Casey at Carter dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Casey at Carter dot net

--- Comment #1 from Casey Carter <Casey at Carter dot net> ---
In C++14, this is conforming behavior per N4140 [expr.unary.noexcept]/3:
"""
3. The result of the noexcept operator is false if in a potentially-evaluated
   context the expression would contain
3.1 - a potentially-evaluated call to a function, member function, function
      pointer, or member function pointer that does not have a non-throwing
      exception-specification, unless the call is a constant expression,
[...]
"""

In C++17 and later, it is not conforming per [expr.unary.noexcept]/3:
"""
3 The result of the noexcept operator is true unless the expression is 
  potentially-throwing ([except.spec]).
""
and [except.spec]/6 which defines "potentially-throwing" and includes no
mention of constant expressions (I won't duplicate the full text here).

Reply via email to