[llvm-bugs] [Bug 24473] New: Variable template cannot be used as dependent name
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 17 05:52:54 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24473
Bug ID: 24473
Summary: Variable template cannot be used as dependent name
Product: clang
Version: 3.6
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: barry.revzin at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following code:
struct Value
{
template<class T>
static constexpr T value = 0;
};
template<typename TValue>
struct Something
{
void foo() {
static_assert(TValue::template value<int> == 0, ""); // error
}
};
int main() {
Something<Value>{}.foo();
}
fails to compile with:
main.cpp:11:40: error: cannot refer to variable template 'value' without a
template argument list
Accessing Value directly within foo() would compile:
static_assert(Value::template value<int> == 0, ""); // OK
--
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/20150817/31bb2111/attachment.html>
More information about the llvm-bugs
mailing list