function_ptr_3.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2016 Modified Work Barrett Adair
3 
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
6 
7 HEADER GUARDS INTENTIONALLY OMITTED
8 DO NOT INCLUDE THIS HEADER DIRECTLY
9 
10 macros used:
11 
12 BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE - the transaction_safe specifier for
13  the current include (`transaction_safe` or nothing)
14 
15 BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE - `std::true_type` or `std::false_type`,
16  tied on whether BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE is `transaction_safe`
17 
18 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER - `transaction_safe` when
19  BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE is enabled, otherwise nothing
20 
21 BOOST_CLBL_TRTS_NOEXCEPT_SPEC - the noexcept specifier for
22  the current include (`noexcept` or nothing)
23 
24 BOOST_CLBL_TRTS_IS_NOEXCEPT - `std::true_type` or `std::false_type`,
25  tied on whether BOOST_CLBL_TRTS_NOEXCEPT_SPEC is `noexcept`
26 
27 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER - `noexcept` if
28  BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES is defined, otherwise nothing
29 */
30 
31 template<typename Return, typename... Args>
32 struct function<
33  BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...)
36  : default_callable_traits<> {
37 
38  static constexpr bool value = true;
39 
40  using traits = function;
41 
42  using return_type = Return;
43 
44  using arg_types = std::tuple<Args...>;
46 
47  using type = BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...)
49 
50  using function_type = Return(Args...);
53 
54  using add_varargs =
55  BOOST_CLBL_TRTS_ST Return (BOOST_CLBL_TRTS_VARARGS_CC *)(Args..., ...)
58 
60 
61  using remove_noexcept = Return(BOOST_CLBL_TRTS_CC *)(Args...)
63 
64  using add_noexcept = Return(BOOST_CLBL_TRTS_CC *)(Args...)
67 
69 
70  using remove_transaction_safe = Return(BOOST_CLBL_TRTS_CC *)(Args...)
72 
73  using add_transaction_safe = Return(BOOST_CLBL_TRTS_CC *)(Args...)
76 
77  template<typename U>
79  BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC U::*)(Args...)
82 
83  template<typename NewReturn>
84  using apply_return =
85  BOOST_CLBL_TRTS_ST NewReturn(BOOST_CLBL_TRTS_CC *)(Args...)
88 
89  template<template<class...> class Container>
90  using expand_args = Container<Args...>;
91 
92  using is_member_pointer = std::false_type;
93 };
94 
#define BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER
Definition: config.hpp:37
#define BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER
Definition: config.hpp:106
#define BOOST_CLBL_TRTS_ST
Definition: function.hpp:84
#define BOOST_CLBL_TRTS_CC
Definition: function.hpp:83
#define BOOST_CLBL_TRTS_VARARGS_CC
Definition: function.hpp:82
#define BOOST_CLBL_TRTS_IS_NOEXCEPT
Definition: function_2.hpp:12
#define BOOST_CLBL_TRTS_NOEXCEPT_SPEC
Definition: function_2.hpp:11
Return(BOOST_CLBL_TRTS_CC *)(Args...) BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER BOOST_CLBL_TRTS_NOEXCEPT_SPEC add_transaction_safe
BOOST_CLBL_TRTS_ST NewReturn(BOOST_CLBL_TRTS_CC *)(Args...) BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE BOOST_CLBL_TRTS_NOEXCEPT_SPEC apply_return
Return(BOOST_CLBL_TRTS_CC *)(Args...) BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER add_noexcept
BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC U::*)(Args...) BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE BOOST_CLBL_TRTS_NOEXCEPT_SPEC apply_member_pointer
BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_CC *)(Args...) BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE type
BOOST_CLBL_TRTS_ST Return(BOOST_CLBL_TRTS_VARARGS_CC *)(Args...,...) BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE BOOST_CLBL_TRTS_NOEXCEPT_SPEC add_varargs
#define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
Definition: function.hpp:11
#define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE
Definition: function.hpp:12