soagen::column_traits struct

Traits for a single column of a table.

Template parameters
Align The minimum memory alignment of the first element in the column.

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 constexpr size_t aligned_stride constexpr
The amount of elements to advance to maintain the requested alignment for this column.
static constexpr size_t alignment constexpr
The minimum memory alignment of the first element in the column.

Typedef documentation

template <typename ValueType _1, size_t Align, typename ParamType _3>
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 _1, size_t Align, typename ParamType _3>
static constexpr 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 _1, size_t Align, typename ParamType _3>
static constexpr size_t soagen::column_traits::alignment constexpr

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