Go to the documentation of this file.
9 #ifndef EAGINE_INTERLEAVED_CALL_HPP
10 #define EAGINE_INTERLEAVED_CALL_HPP
19 template <
typename Func,
typename SepFunc>
25 , _sep_func(sep_func) {}
28 template <
typename... P>
30 if(EAGINE_LIKELY(!_first)) {
35 return _func(std::forward<P>(p)...);
44 template <
typename Func,
typename SepFunc>
45 interleaved_call(Func func, SepFunc sep_func)
46 -> interleaved_call<Func, SepFunc>;
50 #endif // EAGINE_INTERLEAVED_CALL_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
auto operator()(P &&... p)
The function call operator.
Definition: interleaved_call.hpp:29
interleaved_call(Func func, SepFunc sep_func)
Construction from the base function and the separator function.
Definition: interleaved_call.hpp:23
Callable class that interleaves calls to a function with a separator function.
Definition: interleaved_call.hpp:20