codex
|
Namespaces | |
namespace | detail |
Classes | |
class | SOA |
Transparently stores T objects as contiguous arrays of each field. More... | |
Typedefs | |
template<typename T > | |
using | field_tuple_t = decltype(field_tuple(std::declval<T>())) |
Alias of the tuple type returned by field_tuple for type T . | |
template<std::size_t I> | |
using | index_constant = std::integral_constant<std::size_t, I> |
Alias for an integral_constant of size_t . | |
Functions | |
template<typename T , std::size_t ... N> | |
constexpr std::size_t | field_count (void) |
Number of fields in the struct T . | |
template<typename T , std::size_t ... N> requires (requires { T{detail::to_any<N>{}...}; }) | |
constexpr std::size_t | field_count (void) |
Number of fields in the struct T . | |
template<typename T > | |
auto | field_tuple (T &&t) |
Constructs a tuple of references to each field of T , in order. | |
using codex::refl::field_tuple_t = decltype(field_tuple(std::declval<T>())) |
Alias of the tuple type returned by field_tuple for type T
.
using codex::refl::index_constant = std::integral_constant<std::size_t, I> |
Alias for an integral_constant
of size_t
.
|
constexpr |
Number of fields in the struct
T
.
This is the specialization that is always instantiable. It is the converse of the requires
clause in the other member of the overload set, i.e. struct
T
cannot be constructed with N
fields. Because the search is done linearly from zero, the structure must have N - 1
fields.
|
constexpr |
Number of fields in the struct
T
.
Instantiable if it is possible to construct struct
T
with N
fields. codex::refl::detail::to_any is used so that the types of the fields are disregarded. The requires
clause will hold for values of N
from zero to the number of fields in T
.