[llvm-bugs] [Bug 37346] New: explicit specialization in class scope compiles instead of failing
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 6 11:37:46 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37346
Bug ID: 37346
Summary: explicit specialization in class scope compiles
instead of failing
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: rhalbersma at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
struct S
{
template<int N>
constexpr static auto var = 0;
template<>
constexpr static auto var<0> = 1;
};
int main()
{
static_assert(S::var<0> == 1);
}
Fails to compile on clang 6.0 (as well as gcc 7.3 and 8.1) with "explicit
specialization of 'var' in class scope" but compiles with clang SVN-trunk (see
https://wandbox.org/permlink/6t2pfHx8CZkejsWh).
Did the Standard change w.r.t. explicit specializations in class scope, or is
this a regression?
--
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/20180506/432a2998/attachment.html>
More information about the llvm-bugs
mailing list