9 namespace _template_detail
29 template <
typename A,
typename B,
typename... Args>
44 return std::numeric_limits<std::size_t>::max();
54 template <
typename T,
typename U>
57 if constexpr (std::is_same_v<T, U>)
73 template <
typename T,
typename U,
typename V,
typename... Rest>
76 if constexpr (std::is_same_v<T, U>)
90 template <
typename Func>
98 template <
typename Ret,
typename... Args>
108 template <
typename Func>
116 template <
typename Ret,
typename... Args>
124 template <
typename T>
135 template <
typename... Args>
145 static constexpr size_t amount =
sizeof...(Args);
153 template <
size_t index>
156 static_assert(index <
size);
157 using type = std::tuple_element_t<index, std::tuple<Args...>>;
172 template <
typename T,
typename... Types>
190 template <
typename T,
typename Func>
193 return _template_detail::index_of_function_arg<Func>::template
index_of_type<T>();
201 template <auto begin, auto end, auto inc,
class F>
204 f(std::integral_constant<
decltype(begin), begin>{});
205 if constexpr (begin + inc >= end)
214 template <auto begin, auto end, auto inc,
class F>
217 if (not f(std::integral_constant<
decltype(begin), begin>{}))
221 if constexpr (begin + inc >= end)
234 template <
class iterator,
class F>
238 for (; begin != end;)
248 template <
typename T>
254 template <EnumClassConcept Enumeration>
255 constexpr auto as_integer(Enumeration
const value) ->
typename std::underlying_type<Enumeration>::type
257 return static_cast<typename std::underlying_type<Enumeration>::type
>(value);
263 template <
typename T>
266 template <
typename R,
typename... Args>
272 template <
typename R,
typename... Args>
278 template <
typename R,
typename C,
typename... Args>
284 template <
typename R,
typename C,
typename... Args>
290 template <
typename R,
typename C,
typename... Args>
296 template <
typename R,
typename C,
typename... Args>
302 template <
typename R,
typename C,
typename... Args>
308 template <
typename R,
typename C,
typename... Args>
314 template <
typename R,
typename C,
typename... Args>
320 template <
typename R,
typename C,
typename... Args>
326 template <
typename R,
typename C,
typename... Args>
332 template <
typename R,
typename C,
typename... Args>
338 template <
typename R,
typename C,
typename... Args>
344 template <
typename R,
typename C,
typename... Args>
350 template <
typename T>