ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
set_function_qualifiers.hpp
Go to the documentation of this file.
1/*
2
3@Copyright Barrett Adair 2015-2017
4Distributed 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*/
8
9#ifndef BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP
10#define BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP
11
13
14#define BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(QUAL) \
15template<typename Return, typename... Args> \
16struct set_function_qualifiers_t < \
17 flag_map<int QUAL>::value, false, false, Return, Args...> { \
18 using type = Return(Args...) QUAL; \
19}; \
20 \
21template<typename Return, typename... Args> \
22struct set_function_qualifiers_t < \
23 flag_map<int QUAL>::value, true, false, Return, Args...> { \
24 using type = Return(Args...) QUAL \
25 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; \
26}; \
27 \
28template<typename Return, typename... Args> \
29struct set_function_qualifiers_t < \
30 flag_map<int QUAL>::value, false, true, Return, Args...> { \
31 using type = Return(Args...) QUAL \
32 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \
33}; \
34 \
35template<typename Return, typename... Args> \
36struct set_function_qualifiers_t < \
37 flag_map<int QUAL>::value, true, true, Return, Args...> { \
38 using type = Return(Args...) QUAL \
39 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER \
40 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \
41}; \
42 \
43template<typename Return, typename... Args> \
44struct set_varargs_function_qualifiers_t < \
45 flag_map<int QUAL>::value, false, false, Return, Args...> { \
46 using type = Return(Args..., ...) QUAL; \
47}; \
48 \
49template<typename Return, typename... Args> \
50struct set_varargs_function_qualifiers_t < \
51 flag_map<int QUAL>::value, true, false, Return, Args...> { \
52 using type = Return(Args..., ...) QUAL \
53 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER; \
54}; \
55 \
56template<typename Return, typename... Args> \
57struct set_varargs_function_qualifiers_t < \
58 flag_map<int QUAL>::value, false, true, Return, Args...> { \
59 using type = Return(Args..., ...) QUAL \
60 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \
61}; \
62 \
63template<typename Return, typename... Args> \
64struct set_varargs_function_qualifiers_t < \
65 flag_map<int QUAL>::value, true, true, Return, Args...> { \
66 using type = Return(Args..., ...) QUAL \
67 BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER \
68 BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; \
69} \
70
71
72namespace boost { namespace callable_traits { namespace detail {
73
74 template<qualifier_flags Applied, bool IsTransactionSafe,
75 bool IsNoexcept, typename Return, typename... Args>
77 using type = Return(Args...);
78 };
79
80 template<qualifier_flags Applied, bool IsTransactionSafe,
81 bool IsNoexcept, typename Return, typename... Args>
83 using type = Return(Args..., ...);
84 };
85
86#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
87
91
92#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
93
102
103#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
104#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
105
106 template<qualifier_flags Flags, bool IsTransactionSafe, bool IsNoexcept,
107 typename... Ts>
109 typename set_function_qualifiers_t<Flags, IsTransactionSafe, IsNoexcept,
110 Ts...>::type;
111
112 template<qualifier_flags Flags, bool IsTransactionSafe, bool IsNoexcept,
113 typename... Ts>
115 typename set_varargs_function_qualifiers_t<Flags, IsTransactionSafe,
116 IsNoexcept, Ts...>::type;
117
118}}} // namespace boost::callable_traits::detail
119
120#endif //BOOST_CLBL_TRTS_DETAIL_SET_FUNCTION_QUALIFIERS_HPP
typename set_varargs_function_qualifiers_t< Flags, IsTransactionSafe, IsNoexcept, Ts... >::type set_varargs_function_qualifiers
typename set_function_qualifiers_t< Flags, IsTransactionSafe, IsNoexcept, Ts... >::type set_function_qualifiers
#define BOOST_CLBL_TRTS_SET_FUNCTION_QUALIFIERS(QUAL)