https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68666
Bug ID: 68666 Summary: [concepts] "is not a function template" using class-scoped variable template in constraint expression Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Casey at Carter dot net Target Milestone: --- Created attachment 36892 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36892&action=edit Test case Compiling this program with r231219: struct A { template <class> static constexpr bool val = true; }; template <class T> concept bool C = A::val<T>; C{T} struct B {}; results in: ~/gcc6-r231219/bin/g++ -std=c++1z foo.cpp -c foo.cpp:9:15: error: ‘template<class> constexpr const bool A::val< <template-parameter-1-1> >’ is not a function template C{T} struct B {}; ^ I don't disagree with the diagnostic per se - val certainly is not a function template - but I disagree that the program is ill-formed due to that fact. Notably the program compiles correctly if A is a namespace instead of a class: namespace A { template <class> static constexpr bool val = true; } template <class T> concept bool C = A::val<T>; C{T} struct B {};