Home | History | Annotate | Download | only in compiler
      1 /*
      2  * It is known that this code not compiled by following compilers:
      3  *
      4  *   MSVC 6
      5  *
      6  * It is known that this code compiled by following compilers:
      7  *
      8  *   MSVC 8
      9  *   gcc 4.1.1
     10  */
     11 
     12 /*
     13  * This code represent what STLport waits from a compiler which support
     14  * the partial template function ordering (!_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
     15  */
     16 
     17 template <class T1>
     18 struct template_struct {};
     19 
     20 template <class T1>
     21 int func(T1 p1);
     22 
     23 template <class T1>
     24 int func(template_struct<T1>);
     25 
     26 
     27 int foo()
     28 {
     29   int tmp1 = 0;
     30   template_struct<int> tmp2;
     31   func(tmp1);
     32   func(tmp2);
     33   return 0;
     34 }
     35