Bug ID: 30712
           Summary: clang ignores constexpr for static members of objects
                    with reference template type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
    Classification: Unclassified

Created attachment 17455
The testcase fails in test1() but succeeds in test2()

Clang (clang version 4.0.0 (trunk 284333)) does not recognize foo.value as
constexpr when foo is a reference to a template type.
In the testcase test1() fails because foo is of type T &, while test2() works
because foo is of type T.
I am no c++ language lawyer, but this behaviour seems odd to me.
g++ version 6.2 compiles everything just fine.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to