blob: 11021a3f5bc458e12e890225db6df702521f9af7 [file] [log] [blame]
// PR c++/65195
// { dg-do compile { target c++14 } }
template<typename T>
T constant {};
template<typename T>
struct foo {
int operator()() const
{ return 3; }
};
template<typename T>
auto& f = constant<foo<T>>;
int main()
{
// fine
auto& ref = f<int>; ref();
// error: f<int> cannot be used as a function
f<int>();
}