VCCC  2024.05
VisualCamp Common C++ library
apply.hpp
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2020/12/08.
3 # */
4 #
5 # ifndef VCCC_TUPLE_DETAIL_APPLY_HPP
6 # define VCCC_TUPLE_DETAIL_APPLY_HPP
7 #
8 # include <type_traits>
9 # include <utility>
10 #
11 # include "vccc/functional.hpp"
12 
13 namespace vccc {
14 namespace internal {
15 
16 template<class F, class Tuple, std::size_t... I>
17 constexpr inline decltype(auto)
18 apply_impl(F&& f, Tuple&& t, std::index_sequence<I...>) {
19  return vccc::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...);
20 }
21 
22 } // namespace internal
23 } // namespace vccc
24 
25 #endif // VCCC_TUPLE_DETAIL_APPLY_HPP
constexpr invoke_result_t< F, Args... > invoke(F &&f, Args &&... args) noexcept(is_nothrow_invocable< F, Args... >::value)
Definition: invoke.hpp:38
Definition: matrix.hpp:495
Definition: directory.h:12