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_STRIP_SIGNATURE_H
10#define _LIBCPP___TYPE_TRAITS_STRIP_SIGNATURE_H
11
12#include <__config>
13
14#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15# pragma GCC system_header
16#endif
17
18#if _LIBCPP_STD_VER >= 17
19
20_LIBCPP_BEGIN_NAMESPACE_STD
21
22template <class _Fp>
23struct __strip_signature;
24
25# if defined(__cpp_static_call_operator) && __cpp_static_call_operator >= 202207L
26
27template <class _Rp, class... _Args>
28struct __strip_signature<_Rp (*)(_Args...)> {
29 using type _LIBCPP_NODEBUG = _Rp(_Args...);
30};
31
32template <class _Rp, class... _Args>
33struct __strip_signature<_Rp (*)(_Args...) noexcept> {
34 using type _LIBCPP_NODEBUG = _Rp(_Args...);
35};
36
37# endif // defined(__cpp_static_call_operator) && __cpp_static_call_operator >= 202207L
38
39// clang-format off
40template<class _Rp, class _Gp, class ..._Ap>
41struct __strip_signature<_Rp (_Gp::*) (_Ap...)> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
42template<class _Rp, class _Gp, class ..._Ap>
43struct __strip_signature<_Rp (_Gp::*) (_Ap...) const> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
44template<class _Rp, class _Gp, class ..._Ap>
45struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
46template<class _Rp, class _Gp, class ..._Ap>
47struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
48
49template<class _Rp, class _Gp, class ..._Ap>
50struct __strip_signature<_Rp (_Gp::*) (_Ap...) &> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
51template<class _Rp, class _Gp, class ..._Ap>
52struct __strip_signature<_Rp (_Gp::*) (_Ap...) const &> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
53template<class _Rp, class _Gp, class ..._Ap>
54struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile &> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
55template<class _Rp, class _Gp, class ..._Ap>
56struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile &> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
57
58template<class _Rp, class _Gp, class ..._Ap>
59struct __strip_signature<_Rp (_Gp::*) (_Ap...) noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
60template<class _Rp, class _Gp, class ..._Ap>
61struct __strip_signature<_Rp (_Gp::*) (_Ap...) const noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
62template<class _Rp, class _Gp, class ..._Ap>
63struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
64template<class _Rp, class _Gp, class ..._Ap>
65struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
66
67template<class _Rp, class _Gp, class ..._Ap>
68struct __strip_signature<_Rp (_Gp::*) (_Ap...) & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
69template<class _Rp, class _Gp, class ..._Ap>
70struct __strip_signature<_Rp (_Gp::*) (_Ap...) const & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
71template<class _Rp, class _Gp, class ..._Ap>
72struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
73template<class _Rp, class _Gp, class ..._Ap>
74struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
75// clang-format on
76
77_LIBCPP_END_NAMESPACE_STD
78
79#endif // _LIBCPP_STD_VER >= 17
80
81#endif // _LIBCPP___TYPE_TRAITS_STRIP_SIGNATURE_H
82

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

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