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_APPLY_HPP
6 # define VCCC_TUPLE_APPLY_HPP
7 #
8 # include <type_traits>
9 # include <utility>
10 #
12 
13 namespace vccc {
14 
17 
86 template<class F, class Tuple>
87 constexpr inline
88 decltype(auto)
89 apply(F&& f, Tuple&& t) {
90  return internal::apply_impl(
91  std::forward<F>(f), std::forward<Tuple>(t),
92  std::make_index_sequence<std::tuple_size<std::remove_reference_t<Tuple>>::value>{});
93 }
94 
96 
97 } // namespace vccc
98 
99 # endif // VCCC_TUPLE_APPLY_HPP
constexpr decltype(auto) apply(F &&f, Tuple &&t)
calls a function with the elements of tuple of arguments
Definition: apply.hpp:89
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35