template <typename ValueType, size_ t Align = alignof(ValueType), typename ParamType = soagen:: param_type<ValueType>>
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()
andemplace_back()
for columns that have adefault
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.