* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype6.C
blob10086c5fd9ee7b3078f40a112659cc75bfa29f3a
1 // { dg-do compile { target c++11 } }
3 template<typename T, typename U> 
4 struct is_same 
6   static const bool value = false;
7 };
9 template<typename T>
10 struct is_same<T, T>
12   static const bool value = true;
15 template<typename T> const T& foo(); 
18 int i; 
20 template<typename T>
21 struct A 
22
23   double x; 
26 const A<double>* a = new A<double>(); 
28 static_assert(is_same<decltype(foo<int>()), const int&>::value,
29               "type should be const int&");
30 static_assert(is_same<decltype(i), int>::value,
31               "type should be int");
32 static_assert(is_same<decltype(a->x), double>::value,
33               "type should be double");
34 static_assert(is_same<decltype((a->x)), const double&>::value,
35               "type should be const double&");