[llvm-bugs] [Bug 35355] New: Crash when using class template specialization for inner classes
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 18 10:20:20 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35355
Bug ID: 35355
Summary: Crash when using class template specialization for
inner classes
Product: clang
Version: 5.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: jvapen at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The following code crashes the compiler.
When compiling, you do get a warning: warning: explicit specialization of 'C'
within class scope is a Microsoft extension [-Wmicrosoft-template]
When commenting the class A, one gets extra information before crashing: error:
cannot compile this scalar expression yet
class A {};
A operator+(A, const A &);
template <class T, int i>
struct B
{
template <int> struct C {};
template <> struct C<0>
{
static size_t f() { return 0 + T::n; }
};
virtual size_t f() const { return C<i>::f(); }
};
int main(int, char**)
{
B<int, 0> b{};
}
>> clang++.exe t.cpp
--
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/20171118/d3edbb4a/attachment.html>
More information about the llvm-bugs
mailing list