Warning: This file is not a C or C++ file. It does not have highlighting.
1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // |
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 |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H |
10 | #define _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H |
11 | |
12 | #include <__config> |
13 | #include <__type_traits/is_same.h> |
14 | |
15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
16 | # pragma GCC system_header |
17 | #endif |
18 | |
19 | _LIBCPP_BEGIN_NAMESPACE_STD |
20 | |
21 | #if defined(_LIBCPP_COMPILER_GCC) |
22 | template <class _Tp> |
23 | struct __remove_cvref_gcc { |
24 | using type = __remove_cvref(_Tp); |
25 | }; |
26 | |
27 | template <class _Tp> |
28 | using __remove_cvref_t _LIBCPP_NODEBUG = typename __remove_cvref_gcc<_Tp>::type; |
29 | #else |
30 | template <class _Tp> |
31 | using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); |
32 | #endif // __has_builtin(__remove_cvref) |
33 | |
34 | template <class _Tp, class _Up> |
35 | using __is_same_uncvref _LIBCPP_NODEBUG = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >; |
36 | |
37 | #if _LIBCPP_STD_VER >= 20 |
38 | template <class _Tp> |
39 | struct _LIBCPP_NO_SPECIALIZATIONS remove_cvref { |
40 | using type _LIBCPP_NODEBUG = __remove_cvref(_Tp); |
41 | }; |
42 | |
43 | template <class _Tp> |
44 | using remove_cvref_t = __remove_cvref_t<_Tp>; |
45 | #endif |
46 | |
47 | _LIBCPP_END_NAMESPACE_STD |
48 | |
49 | #endif // _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H |
50 |
Warning: This file is not a C or C++ file. It does not have highlighting.