Variable template in template class - unexpected error (possible bug?)
Having: struct Value { template<class T> static constexpr T value{0}; }; (0) ideone template<typename TValue> struct Something { void x() { static_assert(TValue::template value<int> == 0, ""); } }; int main() { Something<Value>{}.x(); return 0; } Does not compile with clang++ 3.6. error: cannot refer to variable template 'value' without a template argument list Does not compile with g++ 5.2. error: ‘template constexpr const T Value::value’ is not a function template (1) ideone Compiles with both clang++ and g++. struct Something { void x() { static_assert(Value::template value<int> == 0, "");