42# if defined(TIMEMORY_CLANG_COMPILER)
43# define TSTAG(X) class
59template <
typename... Types>
60class lightweight_tuple;
62template <
typename... Types>
65template <
typename... Types>
68template <
typename... Types>
71template <
typename... Types>
74template <
typename... Types>
77template <
typename... Types>
80template <
typename... Types>
83template <
typename TupleT,
typename ListT>
86template <
typename TupleT,
typename ListT>
92template <
typename Tag,
typename CompT,
typename BundleT>
95template <
typename ApiT,
typename... Types>
98template <
typename ApiT,
typename... Types>
107template <
typename... Types>
113template <
typename... Types>
119template <
typename... Types>
125template <
typename... Types>
136template <
typename F,
typename... Args>
138: std::is_constructible<std::function<void(Args...)>,
139 std::reference_wrapper<std::remove_reference_t<F>>>
142template <
typename R,
typename F,
typename... Args>
144: std::is_constructible<std::function<R(Args...)>,
145 std::reference_wrapper<std::remove_reference_t<F>>>
148template <
typename F,
typename... Args>
151template <
typename R,
typename F,
typename... Args>
178template <
typename BundleT,
typename DataT>
181template <
typename BundleT,
typename FuncT,
typename... Args>
183execute(BundleT&& _bundle, FuncT&& _func, Args&&...
_args,
185 !std::is_void<std::result_of_t<FuncT(Args...)>>::value,
188template <
typename BundleT,
typename FuncT,
typename... Args>
190execute(BundleT&& _bundle, FuncT&& _func, Args&&...
_args,
192 std::is_void<std::result_of_t<FuncT(Args...)>>::value,
196template <
typename BundleT,
typename ValueT>
198execute(BundleT&& _bundle, ValueT&& _value,
214#if defined(TIMEMORY_USE_DEPRECATED)
241template <
typename T,
typename... Types>
244 using type = std::tuple<Types...>;
249template <
typename T,
typename... Types>
252 using type = std::tuple<Types...>;
270template <
typename... Types>
282template <
typename... Lhs,
typename... Rhs>
285 using type =
typename type_list_only<Lhs..., Rhs...>::type;
294template <
typename... Lhs,
typename... Types,
typename... Rhs>
295struct type_list_only<
type_list<Lhs...>,
std::tuple<Types...>, Rhs...>
297 using type =
typename type_list_only<
typename type_list_only<Lhs..., Types...>::type,
298 typename type_list_only<Rhs...>::type>::type;
301template <
typename... Lhs,
typename... Types,
typename... Rhs>
302struct type_list_only<
type_list<Lhs...>, component_tuple<Types...>, Rhs...>
304 using type =
typename type_list_only<
typename type_list_only<Lhs..., Types...>::type,
305 typename type_list_only<Rhs...>::type>::type;
308template <
typename... Lhs,
typename... Types,
typename... Rhs>
309struct type_list_only<
type_list<Lhs...>, component_list<Types...>, Rhs...>
311 using type =
typename type_list_only<
typename type_list_only<Lhs..., Types...>::type,
312 typename type_list_only<Rhs...>::type>::type;
315#if defined(TIMEMORY_USE_DEPRECATED)
316template <
typename Tup,
typename Lst,
typename... Lhs,
typename... Rhs>
317struct type_list_only<
type_list<Lhs...>, component_hybrid<Tup, Lst>, Rhs...>
319 using type =
typename type_list_only<
typename type_list_only<Lhs..., Tup, Lst>::type,
320 typename type_list_only<Rhs...>::type>::type;
324template <
typename... Lhs,
typename... Types,
typename... Rhs>
325struct type_list_only<
type_list<Lhs...>, auto_tuple<Types...>, Rhs...>
327 using type =
typename type_list_only<
typename type_list_only<Lhs..., Types...>::type,
328 typename type_list_only<Rhs...>::type>::type;
331template <
typename... Lhs,
typename... Types,
typename... Rhs>
332struct type_list_only<
type_list<Lhs...>, auto_list<Types...>, Rhs...>
334 using type =
typename type_list_only<
typename type_list_only<Lhs..., Types...>::type,
335 typename type_list_only<Rhs...>::type>::type;
338#if defined(TIMEMORY_USE_DEPRECATED)
339template <
typename Tup,
typename Lst,
typename... Lhs,
typename... Rhs>
340struct type_list_only<
type_list<Lhs...>, auto_hybrid<Tup, Lst>, Rhs...>
342 using type =
typename type_list_only<
typename type_list_only<Lhs..., Tup, Lst>::type,
343 typename type_list_only<Rhs...>::type>::type;
353template <
typename... Lhs,
typename... Rhs>
354struct type_list_only<
type_list<Lhs...>, Rhs...>
356 using type =
typename type_list_only<
typename type_list_only<Lhs...>::type,
357 typename type_list_only<Rhs...>::type>::type;
360template <
typename... Types,
typename... Rhs>
361struct type_list_only<
std::tuple<Types...>, Rhs...>
363 using type =
typename type_list_only<
typename type_list_only<Types...>::type,
364 typename type_list_only<Rhs...>::type>::type;
367template <
typename... Types,
typename... Rhs>
368struct type_list_only<component_tuple<Types...>, Rhs...>
370 using type =
typename type_list_only<
typename type_list_only<Types...>::type,
371 typename type_list_only<Rhs...>::type>::type;
374template <
typename... Types,
typename... Rhs>
375struct type_list_only<component_list<Types...>, Rhs...>
377 using type =
typename type_list_only<
typename type_list_only<Types...>::type,
378 typename type_list_only<Rhs...>::type>::type;
381template <
typename... Types,
typename... Rhs>
382struct type_list_only<auto_tuple<Types...>, Rhs...>
384 using type =
typename type_list_only<
typename type_list_only<Types...>::type,
385 typename type_list_only<Rhs...>::type>::type;
388template <
typename... Types,
typename... Rhs>
389struct type_list_only<auto_list<Types...>, Rhs...>
391 using type =
typename type_list_only<
typename type_list_only<Types...>::type,
392 typename type_list_only<Rhs...>::type>::type;
395#if defined(TIMEMORY_USE_DEPRECATED)
396template <
typename Tup,
typename Lst,
typename... Rhs>
397struct type_list_only<component_hybrid<Tup, Lst>, Rhs...>
399 using tup_types =
typename type_list_only<Tup>::type;
400 using lst_types =
typename type_list_only<Lst>::type;
401 using type = component_hybrid<convert_t<tup_types, component_tuple<>>,
402 convert_t<lst_types, component_list<>>>;
405template <
typename Tup,
typename Lst,
typename... Rhs>
406struct type_list_only<auto_hybrid<Tup, Lst>, Rhs...>
408 using tup_types =
typename type_list_only<Tup>::type;
409 using lst_types =
typename type_list_only<Lst>::type;
410 using type = auto_hybrid<convert_t<tup_types, component_tuple<>>,
411 convert_t<lst_types, component_list<>>>;
423template <
typename... Types>
426 using type = std::tuple<Types...>;
429template <
typename... Types>
432 using type = std::tuple<Types...>;
435template <
typename... Types>
438 using type = std::tuple<Types...>;
441template <
typename... Types>
442struct concat<component_tuple<Types...>>
444 using type =
typename concat<Types...>::type;
447template <
typename... Types>
448struct concat<component_list<Types...>>
450 using type =
typename concat<Types...>::type;
453template <
typename... Types>
454struct concat<component_list<Types*...>> :
concat<component_list<Types...>>
457template <
typename... Types>
458struct concat<auto_tuple<Types...>>
460 using type =
typename concat<Types...>::type;
463template <
typename... Types>
464struct concat<auto_list<Types...>>
466 using type =
typename concat<Types...>::type;
469template <
typename... Types>
470struct concat<auto_list<Types*...>> :
concat<auto_list<Types...>>
473template <
typename... Lhs,
typename... Rhs>
474struct concat<
std::tuple<Lhs...>, std::tuple<Rhs...>>
476 using type =
typename concat<Lhs..., Rhs...>::type;
482#if defined(TIMEMORY_USE_DEPRECATED)
483template <
typename... TupTypes,
typename... LstTypes>
484struct concat<component_hybrid<
std::tuple<TupTypes...>, std::tuple<LstTypes...>>>
486 using tuple_type = component_tuple<TupTypes...>;
487 using list_type = component_list<LstTypes...>;
488 using type = component_hybrid<tuple_type, list_type>;
491template <
typename... TupTypes,
typename... LstTypes>
492struct concat<component_hybrid<component_tuple<TupTypes...>,
std::tuple<LstTypes...>>>
494 using tuple_type = component_tuple<TupTypes...>;
495 using list_type = component_list<LstTypes...>;
496 using type = component_hybrid<tuple_type, list_type>;
499template <
typename... TupTypes,
typename... LstTypes>
500struct concat<component_hybrid<
std::tuple<TupTypes...>, component_list<LstTypes...>>>
502 using tuple_type = component_tuple<TupTypes...>;
503 using list_type = component_list<LstTypes...>;
504 using type = component_hybrid<tuple_type, list_type>;
507template <
typename... TupTypes,
typename... LstTypes>
510 using tuple_type = component_tuple<TupTypes...>;
511 using list_type = component_list<LstTypes...>;
512 using type = component_hybrid<tuple_type, list_type>;
515template <
typename... TupTypes,
typename... LstTypes>
516struct concat<component_hybrid<component_tuple<TupTypes...>,
type_list<LstTypes...>>>
518 using tuple_type = component_tuple<TupTypes...>;
519 using list_type = component_list<LstTypes...>;
520 using type = component_hybrid<tuple_type, list_type>;
523template <
typename... TupTypes,
typename... LstTypes>
524struct concat<component_hybrid<
type_list<TupTypes...>, component_list<LstTypes...>>>
526 using tuple_type = component_tuple<TupTypes...>;
527 using list_type = component_list<LstTypes...>;
528 using type = component_hybrid<tuple_type, list_type>;
535template <
typename... TupTypes,
typename... LstTypes>
536struct concat<auto_hybrid<
std::tuple<TupTypes...>, std::tuple<LstTypes...>>>
538 using tuple_type = component_tuple<TupTypes...>;
539 using list_type = component_list<LstTypes...>;
540 using type = auto_hybrid<tuple_type, list_type>;
543template <
typename... TupTypes,
typename... LstTypes>
544struct concat<auto_hybrid<component_tuple<TupTypes...>,
std::tuple<LstTypes...>>>
546 using tuple_type = component_tuple<TupTypes...>;
547 using list_type = component_list<LstTypes...>;
548 using type = auto_hybrid<tuple_type, list_type>;
551template <
typename... TupTypes,
typename... LstTypes>
552struct concat<auto_hybrid<
std::tuple<TupTypes...>, component_list<LstTypes...>>>
554 using tuple_type = component_tuple<TupTypes...>;
555 using list_type = component_list<LstTypes...>;
556 using type = auto_hybrid<tuple_type, list_type>;
559template <
typename... TupTypes,
typename... LstTypes>
562 using tuple_type = component_tuple<TupTypes...>;
563 using list_type = component_list<LstTypes...>;
564 using type = auto_hybrid<tuple_type, list_type>;
567template <
typename... TupTypes,
typename... LstTypes>
568struct concat<auto_hybrid<component_tuple<TupTypes...>,
type_list<LstTypes...>>>
570 using tuple_type = component_tuple<TupTypes...>;
571 using list_type = component_list<LstTypes...>;
572 using type = auto_hybrid<tuple_type, list_type>;
575template <
typename... TupTypes,
typename... LstTypes>
576struct concat<auto_hybrid<
type_list<TupTypes...>, component_list<LstTypes...>>>
578 using tuple_type = component_tuple<TupTypes...>;
579 using list_type = component_list<LstTypes...>;
580 using type = auto_hybrid<tuple_type, list_type>;
589template <
typename... Lhs,
typename... Rhs>
592 using type =
typename concat<
typename concat<Lhs...>::type,
593 typename concat<Rhs...>::type>::type;
600template <
typename... Lhs,
typename... Rhs>
601struct concat<component_tuple<Lhs...>, Rhs...>
603 using type =
typename concat<
typename concat<Lhs...>::type,
604 typename concat<Rhs...>::type>::type;
611template <
typename... Lhs,
typename... Rhs>
612struct concat<component_list<Lhs...>, Rhs...>
614 using type =
typename concat<
typename concat<Lhs...>::type,
615 typename concat<Rhs...>::type>::type;
618template <
typename... Lhs,
typename... Rhs>
619struct concat<component_list<Lhs...>*, Rhs*...>
620:
public concat<component_list<Lhs...>, Rhs...>
623template <
typename... Lhs,
typename... Rhs>
624struct concat<component_list<Lhs...>*, Rhs...>
625:
public concat<component_list<Lhs...>, Rhs...>
632template <
typename... Lhs,
typename... Rhs>
633struct concat<auto_tuple<Lhs...>, Rhs...>
635 using type =
typename concat<
typename concat<Lhs...>::type,
636 typename concat<Rhs...>::type>::type;
643template <
typename... Lhs,
typename... Rhs>
644struct concat<auto_list<Lhs...>, Rhs...>
646 using type =
typename concat<
typename concat<Lhs...>::type,
647 typename concat<Rhs...>::type>::type;
650template <
typename... Lhs,
typename... Rhs>
651struct concat<auto_list<Lhs...>*, Rhs*...> :
public concat<auto_list<Lhs...>, Rhs...>
654template <
typename... Lhs,
typename... Rhs>
655struct concat<auto_list<Lhs...>*, Rhs...> :
public concat<auto_list<Lhs...>, Rhs...>
661#if defined(TIMEMORY_USE_DEPRECATED)
662template <
typename Tup,
typename Lst,
typename... Rhs,
typename... Tail>
663struct concat<component_hybrid<Tup, Lst>, component_tuple<Rhs...>, Tail...>
666 typename concat<component_hybrid<
typename concat<Tup, Rhs...>::type, Lst>,
668 using tuple_type =
typename type::tuple_t;
669 using list_type =
typename type::list_t;
672template <
typename Tup,
typename Lst,
typename... Rhs,
typename... Tail>
673struct concat<component_hybrid<Tup, Lst>, component_list<Rhs...>, Tail...>
676 typename concat<component_hybrid<Tup,
typename concat<Lst, Rhs...>::type>,
678 using tuple_type =
typename type::tuple_t;
679 using list_type =
typename type::list_t;
686template <
typename Tup,
typename Lst,
typename... Rhs,
typename... Tail>
687struct concat<auto_hybrid<Tup, Lst>, component_tuple<Rhs...>, Tail...>
689 using type =
typename concat<auto_hybrid<
typename concat<Tup, Rhs...>::type, Lst>,
691 using tuple_type =
typename type::tuple_t;
692 using list_type =
typename type::list_t;
695template <
typename Tup,
typename Lst,
typename... Rhs,
typename... Tail>
696struct concat<auto_hybrid<Tup, Lst>, component_list<Rhs...>, Tail...>
698 using type =
typename concat<auto_hybrid<Tup,
typename concat<Lst, Rhs...>::type>,
700 using tuple_type =
typename type::tuple_t;
701 using list_type =
typename type::list_t;
706template <
typename... Types>
726template <
typename... Types>
730template <
typename Tag,
typename... Types>
734template <
typename... Types>
738template <
typename... Types>
742template <
typename... Types>
746template <
typename... Types>
750template <
typename... Types>
754#if defined(TIMEMORY_USE_DEPRECATED)
755template <
typename TupleT,
typename ListT>
757tuple_size<tim::component_hybrid<TupleT, ListT>>;
759template <
typename TupleT,
typename ListT>
761tuple_size<tim::auto_hybrid<TupleT, ListT>>;
This is a variadic component wrapper where all components are optional at runtime....
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
This is a variadic component wrapper where all components are optional at runtime....
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
This is a variadic component wrapper which provides the least amount of runtime and compilation overh...
This is an intermediate type that permits operations such as:
std::tuple< Types... > type
std::tuple< Types... > type
This concept is used to express how to convert a given type into a std::tuple, e.g....
This concept is used to express how to convert a component bundler which automatically starts upon co...
auto execute(BundleT &&_bundle, FuncT &&_func, Args &&... _args, enable_if_t< is_invocable< FuncT, Args... >::value &&!std::is_void< std::result_of_t< FuncT(Args...)> >::value, int >)
typename impl::concat< Types... >::type concat
std::array< char *, 4 > _args
typename std::enable_if< B, T >::type enable_if_t
Alias template for enable_if.
Static polymorphic base class for automatic start/stop bundlers.
This is a variadic component wrapper which combines the features of tim::component_tuple<T....
This is a variadic component wrapper which combines the features of tim::auto_tuple<T....
typename TIMEMORY_DEFINE_TEMPLATE_CONCEPT(is_empty, auto_bundle, true_type, typename) TIMEMORY_DEFINE_TEMPLATE_CONCEPT(is_empty
typename component_bundle
#define TSTAG(X)
\macro TSTAG
typename typename typename
TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_variadic, std::tuple, true_type, typename) TIMEMORY_DEFINE_VARIADIC_CONCEPT(is_variadic
typename typename TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(tuple_type, std::tuple, typename, std::tuple< T... >) TIMEMORY_DEFINE_VARIADIC_CONCEPT_TYPE(auto_type