http://llvm.org/bugs/show_bug.cgi?id=15481
Bug ID: 15481
Summary: noexcept should check whether the expression is a
constant expression
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Quoth the book of C++, [expr.unary.noexcept]p3:
"The result of the noexcept operator is false if in a potentially-evaluated
context the expression would contain a potentially-evaluated call to a
function, member function, function pointer, or member function pointer that
does not have a non-throwing exception-specification (15.4), *unless the call
is a constant
expression (5.19)*". We do not implement that last phrase:
<stdin>:1:33: error: static_assert failed ""
constexpr int f() { return 0; } static_assert(noexcept(f()), "");
^ ~~~~~~~~~~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs