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 //===----------------------------------------------------------------------===//
9 #ifndef _LIBCPP___FUNCTIONAL_UNWRAP_REF_H
10 #define _LIBCPP___FUNCTIONAL_UNWRAP_REF_H
14 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15 #pragma GCC system_header
18 _LIBCPP_BEGIN_NAMESPACE_STD
21 struct __unwrap_reference
{ typedef _LIBCPP_NODEBUG _Tp type
; };
24 class reference_wrapper
;
27 struct __unwrap_reference
<reference_wrapper
<_Tp
> > { typedef _LIBCPP_NODEBUG _Tp
& type
; };
32 #if _LIBCPP_STD_VER > 17
34 struct unwrap_reference
: __unwrap_reference
<_Tp
> { };
37 using unwrap_reference_t
= typename unwrap_reference
<_Tp
>::type
;
40 struct unwrap_ref_decay
: unwrap_reference
<typename decay
<_Tp
>::type
> { };
43 using unwrap_ref_decay_t
= typename unwrap_ref_decay
<_Tp
>::type
;
47 struct __unwrap_ref_decay
48 #if _LIBCPP_STD_VER > 17
49 : unwrap_ref_decay
<_Tp
>
51 : __unwrap_reference
<typename decay
<_Tp
>::type
>
55 _LIBCPP_END_NAMESPACE_STD
57 #endif // _LIBCPP___FUNCTIONAL_UNWRAP_REF_H