[llvm-bugs] [Bug 30712] New: clang ignores constexpr for static members of objects with reference template type
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Oct 16 06:56:44 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30712
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++
Assignee: unassignedclangbugs at nondot.org
Reporter: jobstz at yahoo.de
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17455
--> https://llvm.org/bugs/attachment.cgi?id=17455&action=edit
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161016/fb1858c4/attachment.html>
More information about the llvm-bugs
mailing list