2 // { dg-options "-std=c++0x" }
4 // Test template deduction
6 typedef decltype(nullptr) nullptr_t;
8 template <typename T, typename U> struct tType_equal;
9 template <typename T> struct tType_equal<T, T> { typedef void type; };
11 template <typename T, typename U>
12 inline typename tType_equal<T, U>::type
15 template<typename T> T h( T t );
19 type_equal<int>(h(0));
20 type_equal<nullptr_t>(h(nullptr));
21 type_equal<float*>(h((float*)nullptr));
23 type_equal<nullptr_t>(h(mynull));
24 type_equal<float*>(h((float*)mynull));