Add support for C++0x nullptr.
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / cpp0x / nullptr14.C
blob0493bcca0067f48b3eee43a71c3d7eb7f5dc2bc1
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
4 // Test overload preference char*/int
6 template <typename T, typename U> struct tType_equal;
7 template <typename T> struct tType_equal<T, T> { typedef void type; };
9 template <typename T, typename U>
10 inline typename tType_equal<T, U>::type
11 type_equal(U) { }
13 char* f( char* );
14 int f( int );
15 long int f( long int );
17 void test_f()
19   // Overloading cases
20   //
21   type_equal<char*>(f(nullptr));
22   type_equal<int>(f(0));