VCCC  2024.05
VisualCamp Common C++ library
custom_sequence.hpp
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2020/12/08.
3 # */
4 #
5 # ifndef VCCC_UTILITY_DETAIL_CUSTOM_SEQUENCE_HPP
6 # define VCCC_UTILITY_DETAIL_CUSTOM_SEQUENCE_HPP
7 #
8 # include <utility>
9 
10 namespace vccc {
11 namespace internal {
12 
14 
15 template <typename T, T v, T... Is>
16 constexpr auto same_sequence (std::integer_sequence<T, Is...> const &)
17 -> decltype( std::integer_sequence<T, v + 0 * Is...>{} );
18 
19 template <std::size_t ... Is>
20 constexpr auto rindex_sequence (std::index_sequence<Is...> const &)
21 -> decltype( std::index_sequence<sizeof...(Is) - 1U - Is...>{} );
22 
23 template<typename T, T start, T incr, T... I>
24 constexpr auto range_sequence(std::integer_sequence<T,I...> const &)
25 -> decltype(std::integer_sequence<T, start + incr * I...>{});
26 
28 
29 } // namespace internal
30 } // namespace vccc
31 
32 # endif // VCCC_UTILITY_DETAIL_CUSTOM_SEQUENCE_HPP
Definition: directory.h:12