Loading...
Searching...
No Matches
HydroCouple::Helpers::DataKindOf< T > Struct Template Reference

DataKindOf maps a C++ type to its DataKind at compile time. More...

#include <hydrocouplehelpers.h>

Collaboration diagram for HydroCouple::Helpers::DataKindOf< T >:

Static Public Attributes

static constexpr DataKind kind = Detail::deduceDataKind<std::remove_cv_t<T>>()
 The DataKind of T.
 

Detailed Description

template<typename T>
struct HydroCouple::Helpers::DataKindOf< T >

DataKindOf maps a C++ type to its DataKind at compile time.

Every integer type maps by width and signedness (so long, long long and size_t all have a kind), float/double to Float32/Float64, bool to Boolean and std::string to String. Any other type is a compile error rather than a silent Opaque: an Opaque descriptor needs an element size the kind cannot supply, so describe opaque elements with makeOpaqueContiguous() instead.

Template Parameters
Tis the C++ element type (cv-qualifiers are ignored).

Member Data Documentation

◆ kind

template<typename T>
DataKind HydroCouple::Helpers::DataKindOf< T >::kind = Detail::deduceDataKind<std::remove_cv_t<T>>()
staticconstexpr

The DataKind of T.


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