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_REFERENCE_H
10#define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
11
12#include <__config>
13
14#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15# pragma GCC system_header
16#endif
17
18_LIBCPP_BEGIN_NAMESPACE_STD
19
20#if __has_builtin(__remove_reference_t)
21template <class _Tp>
22struct _LIBCPP_NO_SPECIALIZATIONS remove_reference {
23 using type _LIBCPP_NODEBUG = __remove_reference_t(_Tp);
24};
25
26template <class _Tp>
27using __libcpp_remove_reference_t _LIBCPP_NODEBUG = __remove_reference_t(_Tp);
28#elif __has_builtin(__remove_reference)
29template <class _Tp>
30struct remove_reference {
31 using type _LIBCPP_NODEBUG = __remove_reference(_Tp);
32};
33
34template <class _Tp>
35using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
36#else
37# error "remove_reference not implemented!"
38#endif // __has_builtin(__remove_reference_t)
39
40#if _LIBCPP_STD_VER >= 14
41template <class _Tp>
42using remove_reference_t = __libcpp_remove_reference_t<_Tp>;
43#endif
44
45_LIBCPP_END_NAMESPACE_STD
46
47#endif // _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
48

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of libcxx/include/__type_traits/remove_reference.h