[LLVMbugs] [Bug 18015] New: static_assert does not print the whole condition on failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 21 06:34:05 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=18015

            Bug ID: 18015
           Summary: static_assert does not print the whole condition on
                    failure
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Example:

static_assert(std::is_same<int,
              float>::value,
              "error message for static assert");

prints:

error: static_assert failed "error message for static assert"
    static_assert(std::is_same<int,
    ^             ~~~~~~~~~~~~~~~~

It should at least print the whole condition, that is:

error: static_assert failed "error message for static assert"
    static_assert(std::is_same<int,
                  float>::value, 
    ^             ~~~~~~~~~~~~~~~~

I'd rather have the complete condition than the "static_assert(" part which is
redundant: 

error: static_assert failed "error message for static assert", condition: 
       std::is_same<int,
                  float>::value
is false.

-- 
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/20131121/7524b333/attachment.html>


More information about the llvm-bugs mailing list