1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 // struct unwrap_reference;
15 // using unwrap_reference_t = typename unwrap_reference<T>::type;
17 // UNSUPPORTED: c++03, c++11, c++14, c++17
20 #include <type_traits>
22 #include "test_macros.h"
25 template <typename T
, typename Expected
>
27 static_assert(std::is_same_v
<typename
std::unwrap_reference
<T
>::type
, Expected
>);
28 static_assert(std::is_same_v
<typename
std::unwrap_reference
<T
>::type
, std::unwrap_reference_t
<T
>>);
34 check_equal
<T
&, T
&>();
35 check_equal
<T
const, T
const>();
36 check_equal
<T
const&, T
const&>();
38 check_equal
<std::reference_wrapper
<T
>, T
&>();
39 check_equal
<std::reference_wrapper
<T
const>, T
const&>();
44 int main(int, char**) {