43 Byte bytes_[Capacity];
47 void* place()
noexcept
49 return static_cast<void*
>(bytes_);
54 const void* place()
const noexcept
56 return static_cast<const void*
>(bytes_);
64 template <
typename Value>
68 (
sizeof(Value) <=
static_cast<size_t>(Capacity)),
69 "Capacity is not sufficient for storing values of the given type."
72 return *
static_cast<Value*
>(place());
76 template <
typename Value>
80 (
sizeof(Value) <=
static_cast<size_t>(Capacity)),
81 "Capacity of the storage is not sufficient to store values of the specified type."
84 return *
static_cast<const Value*
>(place());
88 template <
class Value>
92 (
sizeof(Value) <=
static_cast<size_t>(Capacity)),
93 "Capacity of the storage is not sufficient to store values of the specified type."
96 static_assert(std::is_nothrow_copy_constructible<Value>::value,
"must be noexcept");
98 new (place()) Value(
value);
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_END
#define ONIXS_CMEMDH_NODISCARD
const Value & get() const noexcept
ValueContainer()=default
Initializes the container.
ValueContainer & assign(const Value &value) noexcept
Stores the given value.
bool value(Number &number, const MultiContainer &container, Tag tag)
UInt8 Byte
Alias for Byte.