2 // { dg-options "-std=gnu++0x" }
4 template<typename T, typename U>
7 static const bool value = false;
13 static const bool value = true;
16 template<typename T> const T& foo();
27 const A<double>* a = new A<double>();
29 static_assert(is_same<decltype(foo<int>()), const int&>::value,
30 "type should be const int&");
31 static_assert(is_same<decltype(i), int>::value,
32 "type should be int");
33 static_assert(is_same<decltype(a->x), double>::value,
34 "type should be double");
35 static_assert(is_same<decltype((a->x)), const double&>::value,
36 "type should be const double&");