* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype1.C
blob84c7a03f38283ca366a8cc744f22bb16456210e7
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 const int& foo(); 
16 int i; 
17 struct A { double x; };
18 const A* a = new A(); 
20 static_assert(is_same<decltype(foo()), const int&>::value,
21               "type should be const int&");
22 static_assert(is_same<decltype(i), int>::value,
23               "type should be int");
24 static_assert(is_same<decltype(a->x), double>::value,
25               "type should be double");
26 static_assert(is_same<decltype((a->x)), const double&>::value,
27               "type should be const double&");