1 // { dg-do compile { target c++11 } }
3 template<typename T, typename U>
6 static const bool value = false;
12 static const bool value = true;
15 template<typename T> const T& foo();
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&");