template <typename ValueType, size_t Align = alignof(ValueType), typename ParamType = soagen::param_type<ValueType>>
soagen::column_traits struct

Traits for a single column of a table.

Template parameters
ValueType The column's value type.
Align The minimum memory alignment of the first element in the column.
ParamType The type used for the column in function parameter contexts (e.g. push_back()).

Public types

using default_emplace_type = /* ... */
The default type for emplace() and emplace_back() for columns that have a default value.
using param_forward_type = forward_type<param_type>
The type used when forwarding param_type to the backing container (e.g. table.emplace_back())
using param_type = ParamType
The type used for the column in lvalue function parameter contexts (e.g. push_back(const &)).
using rvalue_forward_type = forward_type<rvalue_type>
The type used when forwarding rvalue_type to the backing container (e.g. table.emplace_back())
using rvalue_type = soagen::rvalue_type<param_type>
The type used for the column in rvalue function parameter contexts (e.g. push_back(&&)).
using storage_type = /* ... */
The internal storage type soagen will use to store a column.
using value_type = ValueType
The column's value type.

Public static variables

static size_t aligned_stride constexpr
The amount of elements to advance to maintain the requested alignment for this column.
static size_t alignment constexpr
The minimum memory alignment of the first element in the column.

Typedef documentation

template <typename ValueType, size_t Align, typename ParamType>
using soagen::column_traits::storage_type = /* ... */

The internal storage type soagen will use to store a column.

In most cases it will be the same as the ValueType, but in some circumstances soagen is able to reduce the number of template instantiations (and thus binary size) by applying simple and safe type transformations (e.g. removing const and volatile, storing all pointer types as void*, et cetera.)

Variable documentation

template <typename ValueType, size_t Align, typename ParamType>
static size_t soagen::column_traits::aligned_stride constexpr

The amount of elements to advance to maintain the requested alignment for this column.

The stride size you need to use when iterating through elements of this column such that the starting element for each batch would have the same memory alignment as the value specified for alignment.

template <typename ValueType, size_t Align, typename ParamType>
static size_t soagen::column_traits::alignment constexpr

The minimum memory alignment of the first element in the column.