13 template<
typename Elem,
typename Scalar = Elem, std::
size_t Components = 1,
bool Nullable = false>
15 static_assert(std::is_standard_layout<Elem>::value,
"elem must be standard layout type");
16 static_assert(std::is_standard_layout<Scalar>::value,
"elem scalar must be standard layout type");
21 constexpr
static std::size_t
stride =
sizeof(Scalar);
29 template<
typename Elem>
35 template<
typename T, std::
size_t N>
45 template<
typename Elem>
46 std::enable_if_t<elem_traits<Elem>::is_nullable,
bool>
is_null(
const Elem& elem) {
47 return elem.is_null();
51 template<
typename Elem>
52 std::enable_if_t<! elem_traits<Elem>::is_nullable,
bool>
is_null(
const Elem& elem) {
Scalar scalar_type
Definition: elem.h:18
std::enable_if_t< elem_traits< Elem >::is_nullable, bool > is_null(const Elem &elem)
Definition: elem.h:46
static constexpr std::size_t stride
Definition: elem.h:21
Elem traits base class with the required members.
Definition: elem.h:14
Default elem traits, using Elem as standard layout scalar type.
Definition: elem.h:30
static constexpr bool is_nullable
Definition: elem.h:23
static constexpr bool is_tuple
Definition: elem.h:19
static constexpr std::size_t components
Definition: elem.h:20