Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:45

0001 /*
0002 Copyright (c) 2016 Barrett Adair
0003 
0004 Distributed under the Boost Software License, Version 1.0.
0005 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
0006 
0007 HEADER GUARDS INTENTIONALLY OMITTED
0008 DO NOT INCLUDE THIS HEADER DIRECTLY
0009 
0010 BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS - the function-level qualifiers for the
0011     current inclusion (combinations of `const` `volatile` `&` `&&`, or nothing)
0012 
0013 BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for
0014     the current include (`transaction_safe` or nothing)
0015 
0016 BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`,
0017     tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe`
0018 
0019 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when
0020     BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing
0021 
0022 BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for
0023     the current include (`noexcept` or nothing)
0024 
0025 BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`,
0026     tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept`
0027 
0028 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if
0029     BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing
0030 */
0031 
0032 template<typename Return, typename T, typename... Args>
0033 struct pmf<Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...)
0034     BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0035     BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0036     BOOST_CLBL_TRTS_NOEXCEPT_SPEC>
0037  : default_callable_traits<dummy BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS> {
0038 
0039     static constexpr bool value = true;
0040 
0041     using has_varargs = std::true_type;
0042 
0043     using traits = pmf;
0044 
0045     using return_type = Return;
0046 
0047     using type = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...)
0048         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0049         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0050         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0051 
0052     using invoke_type = typename std::conditional<
0053         std::is_rvalue_reference<T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
0054         T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS,
0055         typename std::add_lvalue_reference<T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::type
0056     >::type;
0057 
0058     using arg_types = std::tuple<invoke_type, Args...>;
0059     using non_invoke_arg_types = std::tuple<Args...>;
0060 
0061     using function_object_signature = Return(Args..., ...);
0062 
0063     using function_type = Return(invoke_type, Args..., ...);
0064 
0065     using qualified_function_type = Return(Args..., ...)
0066         BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS
0067         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0068         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0069 
0070     using remove_varargs =
0071         Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0072             BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0073             BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0074             BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0075 
0076     using add_varargs = type;
0077 
0078     using is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT;
0079 
0080     using remove_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args..., ...)
0081         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0082         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE;
0083 
0084     using add_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args..., ...)
0085         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0086         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0087         BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
0088 
0089     using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE;
0090 
0091     using remove_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...)
0092         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0093         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0094 
0095     using add_transaction_safe = Return(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...)
0096         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0097         BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER
0098         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0099 
0100     using class_type = T;
0101 
0102     using qualifiers = default_callable_traits<dummy BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>;
0103 
0104     template<qualifier_flags Flags>
0105     using set_qualifiers = set_varargs_member_function_qualifiers<
0106             Flags, is_transaction_safe::value, is_noexcept::value,
0107             BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...>;
0108 
0109     using remove_member_reference = set_qualifiers<qualifiers::cv_flags>;
0110 
0111     using add_member_lvalue_reference = set_qualifiers<
0112         collapse_flags<qualifiers::q_flags, lref_>::value>;
0113 
0114     using add_member_rvalue_reference = set_qualifiers<
0115         collapse_flags<qualifiers::q_flags, rref_>::value>;
0116 
0117     using add_member_const = set_qualifiers<qualifiers::q_flags | const_>;
0118 
0119     using add_member_volatile = set_qualifiers<qualifiers::q_flags | volatile_>;
0120 
0121     using add_member_cv = set_qualifiers<qualifiers::q_flags | cv_>;
0122 
0123     using remove_member_const = set_qualifiers<
0124         qualifiers::ref_flags | remove_const_flag<qualifiers::cv_flags>::value>;
0125 
0126     using remove_member_volatile = set_qualifiers<
0127         qualifiers::ref_flags | remove_volatile_flag<qualifiers::cv_flags>::value>;
0128 
0129     using remove_member_cv = set_qualifiers<qualifiers::ref_flags>;
0130 
0131     template<typename U>
0132     using apply_member_pointer =
0133         Return(BOOST_CLBL_TRTS_VARARGS_CC U::*)(Args..., ...)
0134             BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0135             BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0136             BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0137 
0138     template<typename NewReturn>
0139     using apply_return =
0140         NewReturn(BOOST_CLBL_TRTS_VARARGS_CC T::*)(Args..., ...)
0141             BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0142             BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0143             BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0144 
0145     template<template<class...> class Container>
0146     using expand_args = Container<invoke_type, Args...>;
0147 
0148     using is_member_pointer = std::true_type;
0149 };