dot-xx
A personal collection of small C++ modules
Loading...
Searching...
No Matches
dxx::math::container_traits::Traits< V > Struct Template Reference

Additional traits that tell the library how to handle the vector container type (when std::ranges facilities aren't enought). More...

Static Public Member Functions

static constexpr V construct (uz size)
 Construct the vector of specified size.
static constexpr V construct (uz size)
 Overload for size::Bound -sized containers. See the main overload's doc.
static constexpr V construct (uz size)
 Overload for size::Static -sized containers. See the main overload's doc.

Static Public Attributes

static constexpr auto size_tag = autodetect::size<V>
 The size of container, see dxx::math::container_traits::size.

Detailed Description

template<vector V>
struct dxx::math::container_traits::Traits< V >

Additional traits that tell the library how to handle the vector container type (when std::ranges facilities aren't enought).

Should work by default for STL, specialize for custom types or conform to STL API design

Member Function Documentation

◆ construct()

template<vector V>
constexpr V dxx::math::container_traits::Traits< V >::construct ( uz size)
inlinestaticnodiscardconstexpr

Construct the vector of specified size.

This constructor is expected to also be provided for fixed-size types where you can check whether the runtime-provied size conforms to compile- time restrictions.

The default implementation uses a debug-mode assert for this and does no checks in release builds - see overloads


The documentation for this struct was generated from the following file: