Add support for C++0x nullptr.
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / cpp0x / nullptr17.C
blobacedbae3787ef0e280bef01fbfef65a0a51a77fb
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
4 // Test that bool is a better overload match than 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 int i( int );
14 long int i( long int );
15 bool i( bool );
17 void test_i()
19   // Overload to bool, not int
20   type_equal<bool>(i(nullptr));