You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description: Whether the operand of a noexcept operator is type-dependent is not enough to know if the noexcept operator is value-dependent. There are plenty of non-type-dependent expressions where whether or not it is potentially-throwing is dependent.
GCC already treats all of these as value-dependent. Clang treats noexcept(new int(T{})) as a not value-dependent false but the rest of them as value-dependent.
Suggested resolution:
Remove noexcept from [temp.dep.constexpr]p2 so it becomes value-dependent if its operand is value-dependent according to [temp.dep.constexpr]p1
Expressions of the following form are value-dependent if the unary-expression or expression is type-dependent or the type-id is dependent: sizeofunary-expression
[...] noexcept(expression)
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
[temp.dep.constexpr] value-dependence of noexcept( *expression* )
CWG2905 [temp.dep.constexpr] value-dependence of noexcept( *expression* )Jun 16, 2024
Full name of submitter: Mital Ashok
Reference: [temp.dep.constexpr]
Issue description: Whether the operand of a
noexcept
operator is type-dependent is not enough to know if thenoexcept
operator is value-dependent. There are plenty of non-type-dependent expressions where whether or not it is potentially-throwing is dependent.For example:
GCC already treats all of these as value-dependent. Clang treats
noexcept(new int(T{}))
as a not value-dependentfalse
but the rest of them as value-dependent.Suggested resolution:
Remove
noexcept
from [temp.dep.constexpr]p2 so it becomes value-dependent if its operand is value-dependent according to [temp.dep.constexpr]p1The text was updated successfully, but these errors were encountered: