5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_MANIPULATION_REPEAT_TYPE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_MANIPULATION_REPEAT_TYPE_HPP_
9#include "arene/base/stdlib_choice/cstddef.hpp"
14namespace repeat_type_detail {
16template <
std::size_t N,
template <
typename...>
class T,
typename Arg,
typename... Args>
17struct repeat_type_impl;
19template <
std::size_t N,
template <
typename...>
class T,
typename U,
typename Arg,
typename... Args>
20struct repeat_type_impl_ex;
27template <
std::size_t N,
template <
typename...>
class T,
typename Arg>
30 using type =
typename repeat_type_detail::repeat_type_impl<N - 1UL, T, Arg>
::type;
37template <
template <
typename...>
class T,
typename Arg>
47template <
std::size_t N,
template <
typename...>
class T,
typename Arg>
55template <
std::size_t N,
template <
typename...>
class T,
class U,
typename Arg>
58 using type =
typename repeat_type_detail::repeat_type_impl_ex<N - 1UL, T, U, Arg>
::type;
66template <
template <
typename...>
class T,
class U,
typename Arg>
72namespace repeat_type_detail {
78template <
std::size_t N,
template <
typename...>
class T,
typename Arg,
typename... Args>
79struct repeat_type_impl {
81 using type =
typename repeat_type_impl<N - 1UL, T, Arg, Arg, Args...>::type;
90template <
template <
typename...>
class T,
typename Arg,
typename... Args>
91struct repeat_type_impl<0UL, T, Arg, Args...> {
93 using type = T<Arg, Args...>;
103template <
std::size_t N,
template <
typename...>
class T,
typename U,
typename Arg,
typename... Args>
104struct repeat_type_impl_ex {
106 using type =
typename repeat_type_impl_ex<N - 1UL, T, U, Arg, Arg, Args...>::type;
116template <
template <
typename...>
class T,
class U,
typename Arg,
typename... Args>
117struct repeat_type_impl_ex<0UL, T, U, Arg, Args...> {
119 using type = T<U, Arg, Args...>;
Definition accumulate.hpp:37
typename repeat_type< N, T, Arg >::type repeat_type_t
Repeat a template argument a specified number of times.
Definition repeat_type.hpp:48
Definition accumulate.hpp:36
::size_t size_t
A type suitable for holding the size of an object.
Definition cstddef.hpp:29
T<> type
The resulting type.
Definition repeat_type.hpp:40
T< U > type
The resulting type.
Definition repeat_type.hpp:69
Repeat a template argument a specified number of times with an extra leading template argument.
Definition repeat_type.hpp:56
typename repeat_type_detail::repeat_type_impl_ex< N - 1UL, T, U, Arg >::type type
The resulting type.
Definition repeat_type.hpp:58
Repeat a template argument a specified number of times.
Definition repeat_type.hpp:28
typename repeat_type_detail::repeat_type_impl< N - 1UL, T, Arg >::type type
The resulting type.
Definition repeat_type.hpp:30