ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
remove_member_reference.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_REMOVE_MEMBER_REFERENCE_HPP
10#define BOOST_CLBL_TRTS_REMOVE_MEMBER_REFERENCE_HPP
11
13
14namespace boost { namespace callable_traits {
15
16//[ remove_member_reference_hpp
17/*`
18[section:ref_remove_member_reference remove_member_reference]
19[heading Header]
20``#include <boost/callable_traits/remove_member_reference.hpp>``
21[heading Definition]
22*/
23
24template<typename T>
25using remove_member_reference_t = //see below
26//<-
29 member_qualifiers_are_illegal_for_this_type>;
30
31namespace detail {
32
33 template<typename T, typename = std::false_type>
35
36 template<typename T>
37 struct remove_member_reference_impl <T, typename std::is_same<
38 remove_member_reference_t<T>, detail::dummy>::type>
39 {
41 };
42}
43
44//->
45
46template<typename T>
49
50//<-
51}} // namespace boost::callable_traits
52//->
53
54/*`
55[heading Constraints]
56* `T` must be a function type or a member function pointer type
57* If `T` is a pointer, it may not be cv/ref qualified
58
59[heading Behavior]
60* A substitution failure occuers if the constraints are violated.
61* Removes member `&` or `&&` qualifiers from `T`, if present.
62
63[heading Input/Output Examples]
64[table
65 [[`T`] [`remove_member_const_t<T>`]]
66 [[`int() &`] [`int()`]]
67 [[`int(foo::*)() &`] [`int(foo::*)()`]]
68 [[`int(foo::*)() const &`] [`int(foo::*)() const`]]
69 [[`int(foo::*)() const &&`] [`int(foo::*)() const`]]
70 [[`int(foo::*)()`] [`int(foo::*)()`]]
71 [[`int`] [(substitution failure)]]
72 [[`int (&)()`] [(substitution failure)]]
73 [[`int (*)()`] [(substitution failure)]]
74 [[`int foo::*`] [(substitution failure)]]
75 [[`int (foo::* const)()`] [(substitution failure)]]
76]
77
78[heading Example Program]
79[import ../example/remove_member_reference.cpp]
80[remove_member_reference]
81[endsect]
82*/
83//]
84
85#endif // #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_REFERENCE_HPP
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
detail::try_but_fail_if_invalid< typename detail::traits< T >::remove_member_reference, member_qualifiers_are_illegal_for_this_type > remove_member_reference_t
STL namespace.