Back to home page

EIC code displayed by LXR

 
 

    


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

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 defined, 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_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 traits = pmf;
0042 
0043     using return_type = Return;
0044 
0045     using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0046         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0047         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0048         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0049 
0050     using invoke_type = typename std::conditional<
0051         std::is_rvalue_reference<T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
0052         T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS,
0053         typename std::add_lvalue_reference<T BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::type
0054     >::type;
0055     
0056     using arg_types = std::tuple<invoke_type, Args...>;
0057     using non_invoke_arg_types = std::tuple<Args...>;
0058 
0059     using function_object_signature = Return(Args...);
0060 
0061     using function_type = Return(invoke_type, Args...);
0062 
0063     using qualified_function_type = Return(Args...)
0064         BOOST_CLBL_TRTS_INCLUDE_ABOMINABLE_QUALIFIERS
0065         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0066         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0067 
0068     using remove_varargs = type;
0069     
0070     using add_varargs =
0071         Return(BOOST_CLBL_TRTS_VARARGS_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 is_noexcept = BOOST_CLBL_TRTS_IS_NOEXCEPT;
0077 
0078     using remove_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0079         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0080         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE;
0081 
0082     using add_noexcept = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0083         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0084         BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0085         BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
0086 
0087     using is_transaction_safe = BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE;
0088 
0089     using remove_transaction_safe = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0090         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0091         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0092 
0093     using add_transaction_safe = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
0094         BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0095         BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER
0096         BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0097 
0098     using class_type = T;
0099 
0100     using qualifiers = default_callable_traits<dummy BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>;
0101     
0102     template<qualifier_flags Flags>
0103     using set_qualifiers = set_member_function_qualifiers<
0104             Flags, is_transaction_safe::value, is_noexcept::value,
0105             BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...>;
0106         
0107     using remove_member_reference = set_qualifiers<qualifiers::cv_flags>;
0108     
0109     using add_member_lvalue_reference = set_qualifiers<
0110         collapse_flags<qualifiers::q_flags, lref_>::value>;
0111         
0112     using add_member_rvalue_reference = set_qualifiers<
0113         collapse_flags<qualifiers::q_flags, rref_>::value>;
0114         
0115     using add_member_const = set_qualifiers<qualifiers::q_flags | const_>;
0116 
0117     using add_member_volatile = set_qualifiers<qualifiers::q_flags | volatile_>;
0118 
0119     using add_member_cv = set_qualifiers<qualifiers::q_flags | cv_>;
0120     
0121     using remove_member_const = set_qualifiers<
0122         qualifiers::ref_flags | remove_const_flag<qualifiers::cv_flags>::value>;
0123         
0124     using remove_member_volatile = set_qualifiers<
0125         qualifiers::ref_flags | remove_volatile_flag<qualifiers::cv_flags>::value>;
0126         
0127     using remove_member_cv = set_qualifiers<qualifiers::ref_flags>;
0128     
0129     template<typename U>
0130     using apply_member_pointer =
0131         Return(BOOST_CLBL_TRTS_CC U::*)(Args...)
0132             BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0133             BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0134             BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0135         
0136     template<typename NewReturn>
0137     using apply_return =
0138         NewReturn(BOOST_CLBL_TRTS_CC T::*)(Args...)
0139             BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0140             BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
0141             BOOST_CLBL_TRTS_NOEXCEPT_SPEC;
0142         
0143     template<template<class...> class Container>
0144     using expand_args = Container<invoke_type, Args...>;
0145 
0146     using is_member_pointer = std::true_type;
0147 };