Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / nullptr18.C
blobb8fa38c718d355df7e971c19f6bc55a3ab17ac14
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
4 // Test overload of pointer versus bool when applied on a nullptr_t
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* j( char* );
14 bool j(  bool );
16 void test_j()
18   type_equal<char*>(j(nullptr));
19   decltype(nullptr) mynull = 0;
20   type_equal<char*>(j(mynull));