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 the noexcept
operator is value-dependent. There are plenty of non-type-dependent expressions where whether or not it is potentially-throwing is dependent.
For example:
template<typename T> void f() { noexcept(new int(T{})); noexcept(static_cast<int>(T{})); noexcept(typeid(*T{})); noexcept(delete T{}); }
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:
sizeof
unary-expression
[...]noexcept
(
expression)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4