[LLVMbugs] [Bug 15481] New: noexcept should check whether the expression is a constant expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 9 12:30:06 PST 2013


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: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130309/606baf5b/attachment.html>


More information about the llvm-bugs mailing list