ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
forward_declarations.hpp
Go to the documentation of this file.
1#ifndef BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS
2#define BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS
5
6namespace boost { namespace callable_traits { namespace detail {
7
8template<typename T>
9struct function;
10
11template<typename T>
13{
14 template<typename N, N Value>
15 struct check { check(std::nullptr_t) {} };
16
17 template<typename U>
18 static std::int8_t test(
19 check<decltype(&U::operator()), &U::operator()>);
20
21 template<typename>
22 static std::int16_t test(...);
23
24 static constexpr bool value =
25 sizeof(test<T>(nullptr)) == sizeof(std::int8_t);
26};
27
29 void operator()() {}
30};
31
32template<typename T>
33using default_to_function_object = typename std::conditional<
35 T, callable_dummy>::type;
36
37template<typename T>
38struct pmf;
39
40template<typename T>
41struct pmd;
42
43template<typename F, typename T = typename std::remove_reference<F>::type>
44using function_object_base = typename std::conditional<
48
49template<typename T, typename Base = function_object_base<T>>
50struct function_object;
51
52}}} // namespace boost::callable_traits::detail
53
54#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_FORWARD_DECLARATIONS
typename std::conditional< has_normal_call_operator< T >::value, T, callable_dummy >::type default_to_function_object
typename std::conditional< has_normal_call_operator< T >::value, pmf< decltype(&default_to_function_object< T >::operator())>, default_callable_traits< T > >::type function_object_base
static std::int8_t test(check< decltype(&U::operator()), &U::operator()>)