ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
add_member_cv.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_ADD_MEMBER_CV_HPP
10#define BOOST_CLBL_TRTS_ADD_MEMBER_CV_HPP
11
13
14namespace boost { namespace callable_traits {
15
16//[ add_member_cv_hpp
17/*`
18[section:ref_add_member_cv add_member_cv]
19[heading Header]
20``#include <boost/callable_traits/add_member_cv.hpp>``
21[heading Definition]
22*/
23
24template<typename T>
25using add_member_cv_t = //see below
26//<-
27#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
28
31
33 detail::abominable_functions_not_supported_on_this_compiler,
34 this_compiler_doesnt_support_abominable_function_types>,
35
37 member_qualifiers_are_illegal_for_this_type>>;
38#else
39
42 member_qualifiers_are_illegal_for_this_type>;
43
44#endif // #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
45
46namespace detail {
47
48 template<typename T, typename = std::false_type>
50
51 template<typename T>
52 struct add_member_cv_impl <T, typename std::is_same<
53 add_member_cv_t<T>, detail::dummy>::type>
54 {
56 };
57}
58
59//->
60
61template<typename T>
63
64//<-
65}} // namespace boost::callable_traits
66//->
67
68/*`
69[heading Constraints]
70* `T` must be a function type or a member function pointer type
71* If `T` is a pointer, it may not be cv/ref qualified
72
73[heading Behavior]
74* A substitution failure occurs if the constraints are violated.
75* Adds member `const` and `volatile` qualifiers to `T`, if not already present.
76
77[heading Input/Output Examples]
78[table
79 [[`T`] [`add_member_cv_t<T>`]]
80 [[`int()`] [`int() const volatile`]]
81 [[`int(foo::*)()`] [`int(foo::*)() const volatile`]]
82 [[`int(foo::*)() &`] [`int(foo::*)() const volatile &`]]
83 [[`int(foo::*)() &&`] [`int(foo::*)() const volatile &&`]]
84 [[`int(foo::*)() const`] [`int(foo::*)() const volatile`]]
85 [[`int(foo::*)() volatile`] [`int(foo::*)() const volatile`]]
86 [[`int(foo::*)() transaction_safe`] [`int(foo::*)() const volatile transaction_safe`]]
87 [[`int`] [(substitution failure)]]
88 [[`int (&)()`] [(substitution failure)]]
89 [[`int (*)()`] [(substitution failure)]]
90 [[`int foo::*`] [(substitution failure)]]
91 [[`int (foo::* const)()`] [(substitution failure)]]
92]
93
94[heading Example Program]
95[import ../example/add_member_cv.cpp]
96[add_member_cv]
97[endsect]
98*/
99//]
100
101#endif
sfinae_try< T, fail_when_same< U, invalid_type, ErrorType >, fail_when_same< U, reference_error, reference_type_not_supported_by_this_metafunction > > try_but_fail_if_invalid
Definition utility.hpp:58
typename BOOST_CLBL_TRTS_DISJUNCTION(function_object< unwrap_reference< T > >, function< T >, pmf< T >, pmd< T >, default_callable_traits< T >)::traits traits
Definition traits.hpp:25
typename BOOST_CLBL_TRTS_DISJUNCTION(FailIfs..., success< T >)::_::type sfinae_try
detail::try_but_fail_if_invalid< typename detail::traits< T >::add_member_cv, member_qualifiers_are_illegal_for_this_type > add_member_cv_t
STL namespace.