// PR c++/37177 // { dg-do compile { target c++11 } } #include namespace N1 { template bool foo(); } struct S { template static bool foo(); template bool bar(); }; template bool foo(); int main() { (void)(&S::bar); decltype(&S::bar) a; typeid(&S::bar); (void*)(&S::foo); (void)(&S::foo); decltype(&S::foo) b; typeid(&S::foo); (void*)(&N1::foo); (void)(&N1::foo); decltype(&N1::foo) c; typeid(&N1::foo); (void*)(&foo); (void)(&foo); decltype(&foo) d; typeid(&foo); &foo == 0; }