VCCC  2024.05
VisualCamp Common C++ library
variadic.hpp
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2020/12/08.
3 # */
4 #
5 # ifndef VCCC_TYPE_SUPPORT_STD_VARIADIC_HPP
6 # define VCCC_TYPE_SUPPORT_STD_VARIADIC_HPP
7 #
8 # include <cstdlib>
9 
10 namespace vccc {
11 
24 template<std::size_t i,
25  typename ...Args,
26  std::enable_if_t<(i < sizeof...(Args)), int> = 0>
27 inline
28 decltype(auto)
29 variadic_at(Args&&... args){
30  return std::get<i>(std::forward_as_tuple(std::forward<Args>(args)...));
31 }
32 
34 
35 } // namespace vccc
36 
37 # endif // VCCC_TYPE_SUPPORT_STD_VARIADIC_HPP
decltype(auto) variadic_at(Args &&... args)
Index-based value accessor.
Definition: variadic.hpp:29
Definition: directory.h:12