1 #ifndef GAUDIKERNEL_APPLY_H 2 #define GAUDIKERNEL_APPLY_H 5 #if __cplusplus > 201402L 18 constexpr decltype(
auto )
apply_impl( F&& f, Tuple&& t,
std::index_sequence<I...> ) noexcept(
21 return Gaudi::invoke( std::forward<F>( f ), std::get<I>( std::forward<Tuple>( t ) )... );
30 template <
class F,
class Tuple>
31 constexpr decltype(
auto )
apply( F&& f,
Tuple&& t ) noexcept( noexcept(
33 std::make_index_sequence<
std::tuple_size<
std::remove_reference_t<
Tuple>>::value>{} ) ) )
36 std::make_index_sequence<std::tuple_size<std::remove_reference_t<Tuple>>::value>{} );
decltype(auto) constexpr apply(F &&f, Tuple &&t) noexcept(noexcept( detail::apply_impl(std::forward< F >(f), std::forward< Tuple >(t), std::make_index_sequence< std::tuple_size< std::remove_reference_t< Tuple >>::value >{})))
TupleObj.h GaudiAlg/TupleObj.h namespace with few technical implementations.
decltype(auto) constexpr apply_impl(F &&f, Tuple &&t, std::index_sequence< I... >) noexcept( noexcept(Gaudi::invoke(std::forward< F >(f), std::get< I >(std::forward< Tuple >(t))...)))
auto invoke(F &&f, ArgTypes &&...args) noexcept(noexcept(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))) -> decltype(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))
Helper functions to set/get the application return code.