1 // RUN: %clang_cc1 -std=c++11 %s -Wunused -Wno-unused-lambda-capture -verify
2 // expected-no-diagnostics
4 template<typename T
, typename U
>
6 static const bool value
= false;
10 struct is_same
<T
, T
> {
11 static const bool value
= true;
21 static_assert(is_same
<decltype(((r
))), float const&>::value
,
22 "should be const float&");
23 static_assert(is_same
<decltype(x
), float>::value
, "should be float");
24 static_assert(is_same
<decltype((x
)), const float&>::value
,
25 "should be const float&");
26 static_assert(is_same
<decltype(r
), float&>::value
, "should be float&");
27 static_assert(is_same
<decltype(ir
), int&>::value
, "should be int&");
28 static_assert(is_same
<decltype((ir
)), int&>::value
, "should be int&");
29 static_assert(is_same
<decltype(irc
), const int&>::value
,
30 "should be const int&");
31 static_assert(is_same
<decltype((irc
)), const int&>::value
,
32 "should be const int&");
37 static_assert(is_same
<decltype(x
), float>::value
, "should be float");
38 static_assert(is_same
<decltype((x
)), float&>::value
,
44 static_assert(is_same
<decltype((i
)), int&>::value
, "should be int&");