mirror of
https://github.com/Naios/continuable.git
synced 2025-12-07 01:06:44 +08:00
Move the composition strategies into their own header
This commit is contained in:
parent
3df06820ef
commit
49a097660b
@ -145,6 +145,11 @@ struct continuable_dispatcher {
|
|||||||
};
|
};
|
||||||
} // namespace all
|
} // namespace all
|
||||||
|
|
||||||
|
struct composition_strategy_all_tag {};
|
||||||
|
template <>
|
||||||
|
struct is_composition_strategy<composition_strategy_all_tag> // ...
|
||||||
|
: std::true_type {};
|
||||||
|
|
||||||
/// Finalizes the all logic of a given composition
|
/// Finalizes the all logic of a given composition
|
||||||
template <>
|
template <>
|
||||||
struct composition_finalizer<composition_strategy_all_tag> {
|
struct composition_finalizer<composition_strategy_all_tag> {
|
||||||
|
|||||||
@ -160,6 +160,11 @@ struct continuable_dispatcher {
|
|||||||
};
|
};
|
||||||
} // namespace any
|
} // namespace any
|
||||||
|
|
||||||
|
struct composition_strategy_any_tag {};
|
||||||
|
template <>
|
||||||
|
struct is_composition_strategy<composition_strategy_any_tag> // ...
|
||||||
|
: std::true_type {};
|
||||||
|
|
||||||
/// Finalizes the any logic of a given composition
|
/// Finalizes the any logic of a given composition
|
||||||
template <>
|
template <>
|
||||||
struct composition_finalizer<composition_strategy_any_tag> {
|
struct composition_finalizer<composition_strategy_any_tag> {
|
||||||
|
|||||||
@ -126,6 +126,11 @@ public:
|
|||||||
};
|
};
|
||||||
} // namespace seq
|
} // namespace seq
|
||||||
|
|
||||||
|
struct composition_strategy_seq_tag {};
|
||||||
|
template <>
|
||||||
|
struct is_composition_strategy<composition_strategy_seq_tag> // ...
|
||||||
|
: std::true_type {};
|
||||||
|
|
||||||
/// Finalizes the seq logic of a given composition
|
/// Finalizes the seq logic of a given composition
|
||||||
template <>
|
template <>
|
||||||
struct composition_finalizer<composition_strategy_seq_tag> {
|
struct composition_finalizer<composition_strategy_seq_tag> {
|
||||||
|
|||||||
@ -47,22 +47,9 @@ namespace detail {
|
|||||||
/// The namespace `composition` offers methods to chain continuations together
|
/// The namespace `composition` offers methods to chain continuations together
|
||||||
/// with `all`, `any` or `seq` logic.
|
/// with `all`, `any` or `seq` logic.
|
||||||
namespace composition {
|
namespace composition {
|
||||||
struct composition_strategy_all_tag {};
|
template <typename T>
|
||||||
struct composition_strategy_any_tag {};
|
|
||||||
struct composition_strategy_seq_tag {};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
struct is_composition_strategy // ...
|
struct is_composition_strategy // ...
|
||||||
: std::false_type {};
|
: std::false_type {};
|
||||||
template <>
|
|
||||||
struct is_composition_strategy<composition_strategy_all_tag> // ...
|
|
||||||
: std::true_type {};
|
|
||||||
template <>
|
|
||||||
struct is_composition_strategy<composition_strategy_any_tag> // ...
|
|
||||||
: std::true_type {};
|
|
||||||
template <>
|
|
||||||
struct is_composition_strategy<composition_strategy_seq_tag> // ...
|
|
||||||
: std::true_type {};
|
|
||||||
|
|
||||||
/// Adds the given continuation tuple to the left composition
|
/// Adds the given continuation tuple to the left composition
|
||||||
template <typename... LeftArgs, typename... RightArgs>
|
template <typename... LeftArgs, typename... RightArgs>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user