// { dg-do compile } // { dg-options "-std=c++0x" } // Test that bool is a better overload match than int template struct tType_equal; template struct tType_equal { typedef void type; }; template inline typename tType_equal::type type_equal(U) { } int i( int ); long int i( long int ); bool i( bool ); void test_i() { // Overload to bool, not int type_equal(i(nullptr)); decltype(nullptr) mynull = 0; type_equal(i(mynull)); }