[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / explicit-args2.C
blob3b5537bade7baee163cd54b7497864c09e33cfb0
1 // PR c++/37177
2 // { dg-do compile { target c++11 } }
4 #include <typeinfo>
6 namespace N1
8   template<class T> bool foo();
11 struct S
13   template <class T>
14   static bool foo();
16   template <class T>
17   bool bar();
20 template<class T> bool foo();
22 int main()
24   (void)(&S::bar<int>);
25   decltype(&S::bar<int>) a;
26   typeid(&S::bar<int>);
28   (void*)(&S::foo<int>);
29   (void)(&S::foo<int>);
30   decltype(&S::foo<int>) b;
31   typeid(&S::foo<int>);
33   (void*)(&N1::foo<int>);
34   (void)(&N1::foo<int>);
35   decltype(&N1::foo<int>) c;
36   typeid(&N1::foo<int>);
38   (void*)(&foo<int>);
39   (void)(&foo<int>);
40   decltype(&foo<int>) d;
41   typeid(&foo<int>);
43   &foo<int> == 0;