ccutl
0.3.2
a C++ utilities library focused on flexibility and expressibility
|
#include <ccutl.h>
Public Types | |
template<template< class... > class Template, typeof< Template > T> | |
using | from = typename detail::type_pack::from< Template, T >::template type< Ts... > |
template<template< class... > class Template> | |
using | to = Template< Ts... > |
template<class T > | |
using | push_back = type_pack< Ts..., T > |
template<class T > | |
using | push_front = type_pack< T, Ts... > |
template<typeof< type_pack > Other> | |
using | concat = typename detail::type_pack::concat< Other >::template type< Ts... > |
Public Member Functions | |
constexpr | type_pack (const type_pack< Ts... > &)=default |
constexpr | type_pack (type_pack< Ts... > &&)=default |
template<template< class... > class Template, class... Us> | |
constexpr | type_pack (const Template< Us... > &) noexcept |
Placeholder constructor for deduction-guide construction. | |
template<template< class... > class Template, class... Us> | |
constexpr | type_pack (Template< Us... > &&) noexcept |
Placeholder constructor for deduction-guide construction. | |
template<std::size_t idx> | |
requires (idx< size) using get | |
template<std::size_t n_removed = 1ul> | |
requires (size >=n_removed) using pop_back | |
template<std::size_t n_removed = 1ul> | |
requires (size >=n_removed) using pop_front | |
template<std::size_t begin, std::size_t end = size> | |
requires (size >=0 and begin<=end and end<=size) using slice | |
Static Public Attributes | |
static constexpr std::size_t | size = sizeof...(Ts) |
Represents the number of types in the pack. | |
Provides a template type arg container with transformational utilities
using ctl::type_pack< Ts >::concat = typename detail::type_pack::concat<Other>::template type<Ts...> |
using ctl::type_pack< Ts >::from = typename detail::type_pack::from<Template, T>::template type<Ts...> |
Creates a type_pack from all type template arguments in a type template
Template | - Template name |
T | [Template<class...>] - Type to grab arguments from type_pack<>::from<Template<int, float>>; // -> type_pack<int, float>
|
using ctl::type_pack< Ts >::push_back = type_pack<Ts..., T> |
Represents a type_pack with T pushed to the back
T | - Type to push back |
using ctl::type_pack< Ts >::push_front = type_pack<T, Ts...> |
Represents a type_pack with T pushed to the front
T | - Type to push front |
using ctl::type_pack< Ts >::to = Template<Ts...> |
Represents a type-specialized template using the types in this pack
Template | - Template to type-specialize |
Represents a type from the pack at index idx
idx | - Index to retrieve |
ctl::type_pack< Ts >::requires | ( | size >=0 and begin<=end and end<= | size | ) |
Represents a type_pack from a slice of this pack [begin, end)
begin | - First element index |
end | - Element index following last element index |
ctl::type_pack< Ts >::requires | ( | size >= | n_removed | ) |
Represents a type_pack with its last n_removed elements removed
n_removed | [ =1 ] - Number of elements to remove |
ctl::type_pack< Ts >::requires | ( | size >= | n_removed | ) |
Represents a type_pack with its first n_removed elements removed
n_removed | [ =1 ] - Number of elements to remove |