Zivid C++ API 2.13.1+18e79e79-1
DataFormatUtils.h File Reference
#include <type_traits>

Go to the source code of this file.

Macros

#define ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE(Type, size)
 

Macro Definition Documentation

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE

#define ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( Type,
size )
Value:
static_assert(sizeof(Type) == size, "Size of type must be " #size); \
static_assert(std::is_trivial<Type>::value, "Type must be trivial"); \
static_assert(std::is_standard_layout<Type>::value, "Type must be standard_layout"); \
static_assert(std::is_trivially_copy_constructible<Type>::value, "Type must be trivially copy constructible"); \
static_assert(std::is_trivially_move_constructible<Type>::value, "Type must be trivially move constructible"); \
static_assert(std::is_trivially_copy_assignable<Type>::value, "Type must be trivially copy assignable"); \
static_assert(std::is_trivially_move_assignable<Type>::value, "Type must be trivially move assignable"); \
static_assert(std::is_trivially_destructible<Type>::value, "Type must be trivially destructible"); \
static_assert(std::is_nothrow_default_constructible<Type>::value, "Type must be nothrow default constructible"); \
static_assert(std::is_nothrow_copy_constructible<Type>::value, "Type must be nothrow copy constructible"); \
static_assert(std::is_nothrow_move_constructible<Type>::value, "Type must be nothrow move constructible"); \
static_assert(std::is_nothrow_copy_assignable<Type>::value, "Type must be nothrow copy assignable"); \
static_assert(std::is_nothrow_move_assignable<Type>::value, "Type must be nothrow move assignable"); \
static_assert(std::is_nothrow_destructible<Type>::value, "Type must be nothrow destructible")