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;
17 struct A { double x; };
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&");