type_list
type_list
Section titled “type_list”#include <xalgospp/parameters.hh>template<typename... Ts>struct type_listDefined in src/lib/xalgospp/parameters.hh:60
Simple type-list for compile-time listing of inputs/outputs.
Versus the ncarray type list, this one also provides a size accessor.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
accepts |
variable |
Declared here |
index_of |
variable |
Declared here |
accepts_when_paired |
variable |
Declared here |
size |
function |
Declared here |
type_at |
typedef |
Declared here |
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr bool |
accepts static constexpr |
Evaluates true if the type U is in the type list. |
constexpr hd_std::ptrdiff_t |
index_of static constexpr |
Retrieve the index N of a type from the list given the type. |
constexprbool |
accepts_when_paired static constexpr |
Evalutes true if type U is accepted, and type V is in its list at the same index. |
accepts
Section titled “accepts”static constexpr
constexpr bool accepts = (sizeof...(Ts) == 0) || ( (hd_std::is_same_v<hd_std::decay_t<U>, hd_std::decay_t<Ts>> || hd_std::is_convertible_v<hd_std::decay_t<U>, hd_std::decay_t<Ts>>) || ...)Defined in src/lib/xalgospp/parameters.hh:93
Evaluates true if the type U is in the type list.
index_of
Section titled “index_of”static constexpr
constexpr hd_std::ptrdiff_t index_of = (sizeof...() == 0) ? -1 : <, 0, Ts...>::valueDefined in src/lib/xalgospp/parameters.hh:109
Retrieve the index N of a type from the list given the type.
accepts_when_paired
Section titled “accepts_when_paired”static constexpr
constexprbool accepts_when_paired = []() { (sizeof...() == 0 || OtherList::size() == 0) {
; } { { <> }; ( < 0 || >= <hd_std::ptrdiff_t>(OtherList::size())) {
; } {
= OtherList::template <<hd_std::size_t>()>;
hd_std::is_same_v<hd_std::decay_t<>, hd_std::decay_t<>> || hd_std::is_convertible_v<hd_std::decay_t<>, hd_std::decay_t<>>; } } }()Defined in src/lib/xalgospp/parameters.hh:121
Evalutes true if type U is accepted, and type V is in its list at the same index.
This allows enforcement of strict ordering between two type_lists, where the checking of types requires that both types are in their respective lists, and that they appear in the same position.
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
XALG_HDconstexpr hd_std::size_t |
size static inline constexpr |
Returns the length of the type list, i.e., the number of types. |
static inline constexpr
constexpr static inline XALG_HDconstexpr hd_std::size_t size()Defined in src/lib/xalgospp/parameters.hh:87
Returns the length of the type list, i.e., the number of types.
Returns
Section titled “Returns”The length of the type list.
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
type_at |
Access the Nth type from the list. |
type_at
Section titled “type_at”using type_at = typename hd_std::tuple_element< N, hd_std::tuple< Ts... > >::typeDefined in src/lib/xalgospp/parameters.hh:103
Access the Nth type from the list.