34 template <
typename Tuple>
39 namespace apply_tuple {
47 template <
typename F,
typename T, std::size_t... I>
51 return invoke(static_cast<F&&>(
f), get<I>(static_cast<T&&>(
t))...);
57 std::size_t... Indices,
58 typename ReturnTuple =
59 std::tuple<decltype(get<Indices>(std::declval<Tuple>()))...>>
61 return ReturnTuple{get<Indices>(std::forward<Tuple>(tuple))...};
69 template <
typename F,
typename T>
79 #if __cpp_lib_apply >= 201603 83 #else // __cpp_lib_apply >= 201603 86 template <
typename F,
typename Tuple>
87 constexpr decltype(
auto)
apply(F&& func, Tuple&& tuple) {
88 return ApplyInvoke{}(
static_cast<F&&
>(func), static_cast<Tuple&&>(tuple));
91 #endif // __cpp_lib_apply >= 201603 109 template <
typename Tuple>
112 std::declval<Tuple>(),
116 std::forward<Tuple>(tuple),
123 template <
typename F,
typename Tuple>
125 template <
typename F,
typename Tuple>
127 template <
typename F,
typename Tuple>
129 template <
typename R,
typename F,
typename Tuple>
131 template <
typename F,
typename Tuple>
133 template <
typename R,
typename F,
typename Tuple>
138 namespace apply_tuple {
144 explicit Uncurry(
const F& func) : func_(func) {}
146 template <
class Tuple>
148 -> decltype(
apply(
std::declval<F>(),
std::forward<Tuple>(tuple))) {
149 return apply(func_, std::forward<Tuple>(tuple));
184 #if __cpp_lib_make_from_tuple || (_MSC_VER >= 1910 && _MSVC_LANG > 201402) 191 namespace apply_tuple {
194 template <
class...
Args>
196 return T(std::forward<Args>(args)...);
203 template <
class T,
class Tuple>
make_index_sequence< std::tuple_size< Tuple >::value > index_sequence_for_tuple
static constexpr auto invoke_(F &&f, T &&t, index_sequence< I... >) noexcept(is_nothrow_invocable< F &&, decltype(get< I >(std::declval< T >()))... >::value) -> invoke_result_t< F &&, decltype(get< I >(std::declval< T >()))... >
index_sequence_for_tuple< std::remove_reference_t< T >> seq
auto forward_tuple(Tuple &&tuple, index_sequence< Indices... >) -> ReturnTuple
typename invoke_result< F, Args... >::type invoke_result_t
auto uncurry(F &&f) -> detail::apply_tuple::Uncurry< typename std::decay< F >::type >
constexpr detail::Map< Move > move
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
constexpr auto invoke(F &&f, Args &&...args) noexcept(noexcept(static_cast< F && >(f)(static_cast< Args && >(args)...))) -> decltype(static_cast< F && >(f)(static_cast< Args && >(args)...))
make_integer_sequence< std::size_t, Size > make_index_sequence
invoke_result_t< ApplyInvoke, F, Tuple > apply_result_t
constexpr T operator()(Args &&...args) const
auto operator()(Tuple &&tuple) const -> decltype(apply(std::declval< F >(), std::forward< Tuple >(tuple)))
constexpr auto operator()(F &&f, T &&t) const noexcept(noexcept(invoke_(static_cast< F && >(f), static_cast< T && >(t), seq< T >{}))) -> decltype(invoke_(static_cast< F && >(f), static_cast< T && >(t), seq< T >
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
PUSHMI_INLINE_VAR constexpr detail::get_fn< T > get
constexpr T make_from_tuple(Tuple &&t)
decltype(auto) constexpr apply(F &&func, Tuple &&tuple)