https://bugs.llvm.org/show_bug.cgi?id=43556
Bug ID: 43556
Summary: Auto type deduction of member variable template within
class template fails to compile
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangb...@nondot.org
Reporter: ja...@invexed.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
https://godbolt.org/z/cGowWI
The following code fails to compile with Clang (but is accepted by GCC and
MSVC)
template<typename>
struct S {
template<typename T>
static constexpr auto value = T{0};
};
int main()
{
return S<int>::value<int>;
}
This can be resolved by explicitly specifying the type of S::value instead:
template<typename T>
static constexpr T value = T{0};
Furthermore, this bug only seems to occur if S and S::value are both templates.
--
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