https://bugs.llvm.org/show_bug.cgi?id=41785
Bug ID: 41785
Summary: Making class template breaks compilation
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: we...@wsoptics.de
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
The following code compiles iff `-DFIX` is provided:
template <int a>
struct b : b<a - 1>
{
static constexpr unsigned c = a;
};
template <>
struct b<0>
{
};
#ifndef FIX
template <typename>
#endif
class X
{
void e();
static auto e(b<1> f) -> b<decltype(f)::c>;
static auto e(b<decltype(e(b<2>{}))::c + 1> f) -> b<decltype(f)::c>;
void e(b<decltype(e(b<2>{}))::c + 1>);
};
Also see https://godbolt.org/z/VHG_cE
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs