Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / template / defarg5.C
blobb436374160d0ad5c92532fd3a38d4aae51b4ba7e
1 // { dg-do compile }
3 // Origin: Ivan Godard <igodard@pacbell.net>
4 //         Wolfgang Bangerth <bangerth@dealii.org>
6 // PR c++/17344: Substitution failure is not an error
7 // for default template argument
9 template <class> struct intTraits; 
11 template<> struct intTraits<int> { 
12     static const int i = 0; 
13 }; 
15 template<typename E, E i = intTraits<E>::i> struct A {}; 
17 struct S { 
18     template <template <typename> class X> S(X<void>); 
19 }; 
21 int bar(S); 
22 int bar(A<int,0>); 
24 A<int> bed; 
25 int i = bar(bed);