[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr4926-1.C
blobec2b226fe9228d9235568a49f5a37a50a83e70c8
1 // PR c++/4926
2 // { dg-do compile }
4 template <unsigned> struct X { typedef int Type; };
5 template <typename T> struct Y { char array[1]; };
6  
7 template<typename T> Y<T> P(T);  // acts as "Y<typeof(T)>"
8  
9 struct F { int operator()() const; };
11 template <typename T>
12 typename X<sizeof(P(  T()()  ).array)>::Type  foo();
14 void
15 bar () 
16
17   foo<F>();