50template<
typename Type>
53ONIXS_ICEBOE_FORCEINLINE
57 return static_cast<void*
>(ptr);
62template <
typename Type>
65ONIXS_ICEBOE_FORCEINLINE
69 return static_cast<const void*
>(ptr);
72#if defined(__cpp_lib_to_address) && defined(__cpp_lib_concepts)
77template <std::contiguous_iterator Iterator>
78 requires (!std::is_pointer_v<Iterator>)
81ONIXS_ICEBOE_FORCEINLINE
89template <
typename Type>
92ONIXS_ICEBOE_FORCEINLINE
96 return const_cast<void*
>(
static_cast<const void*
>(ptr));
101template<
typename Type>
104ONIXS_ICEBOE_FORCEINLINE
113template<
typename Type>
116ONIXS_ICEBOE_FORCEINLINE
125template <
typename Type>
128ONIXS_ICEBOE_FORCEINLINE
132 return reinterpret_cast<Type*
>(
toByteBlock(pointer) + distance);
138template<
typename Type>
141ONIXS_ICEBOE_FORCEINLINE
145 return reinterpret_cast<Type*
>(
toByteBlock(pointer) - distance);
150template<
typename Left,
typename Right>
153ONIXS_ICEBOE_FORCEINLINE
164ONIXS_ICEBOE_FORCEINLINE
169 CHECK_TYPE_INTEGRAL(Value);
172 std::memcpy(&result, location,
sizeof(Value));
183 template <
class Value>
184 ONIXS_ICEBOE_FORCEINLINE
185 static std::tuple<typename Value::MemberTraits::FirstArgType>
188 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
190 static_assert(std::is_nothrow_constructible<Value, FirstArgType>::value,
191 "Value must be nothrow-constructible from its member types");
203 template <
class Value>
206 typename Value::MemberTraits::FirstArgType,
207 typename Value::MemberTraits::SecondArgType
209 ONIXS_ICEBOE_FORCEINLINE
212 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
213 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
215 static_assert(std::is_nothrow_constructible<
217 FirstArgType, SecondArgType>::value,
218 "Value must be nothrow-constructible from its member types");
222 return std::tuple<FirstArgType, SecondArgType>(
233 template <
class Value>
234 ONIXS_ICEBOE_FORCEINLINE
237 typename Value::MemberTraits::FirstArgType,
238 typename Value::MemberTraits::SecondArgType,
239 typename Value::MemberTraits::ThirdArgType
243 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
244 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
245 typedef typename Value::MemberTraits::ThirdArgType ThirdArgType;
247 static_assert(std::is_nothrow_constructible<
249 FirstArgType, SecondArgType, ThirdArgType>::value,
250 "Value must be nothrow-constructible from its member types");
254 return std::tuple<FirstArgType, SecondArgType, ThirdArgType>(
267 template <
class Value>
268 ONIXS_ICEBOE_FORCEINLINE
271 typename Value::MemberTraits::FirstArgType,
272 typename Value::MemberTraits::SecondArgType,
273 typename Value::MemberTraits::ThirdArgType,
274 typename Value::MemberTraits::FourthArgType
278 typedef typename Value::MemberTraits::FirstArgType FirstArgType;
279 typedef typename Value::MemberTraits::SecondArgType SecondArgType;
280 typedef typename Value::MemberTraits::ThirdArgType ThirdArgType;
281 typedef typename Value::MemberTraits::FourthArgType FourthArgType;
283 static_assert(std::is_nothrow_constructible<
285 FirstArgType, SecondArgType, ThirdArgType, FourthArgType>::value,
286 "Value must be nothrow-constructible from its member types");
290 return std::tuple<FirstArgType, SecondArgType, ThirdArgType, FourthArgType>(
300template <
class Value>
301ONIXS_ICEBOE_FORCEINLINE
302typename std::enable_if<details::HasMemberTraits<Value>::value, Value>::type
310template <
class Value>
311ONIXS_ICEBOE_FORCEINLINE
312typename std::enable_if<!details::HasMemberTraits<Value>::value, Value>::type
320template <
class Value>
321constexpr typename std::enable_if<!details::HasMemberTraits<Value>::value,
size_t>::type
324 return sizeof(cleanType<Value>);
328template <
class Value>
329constexpr typename std::enable_if<details::HasMemberTraits<Value>::value,
size_t>::type
336template <
class Value>
337ONIXS_ICEBOE_FORCEINLINE
338typename std::enable_if<!details::HasSerializeMember<Value>::value>::type
342 static_assert(details::smallType<Value>::value, ONIXS_ICEBOE_TO_STR(Value));
343 std::memcpy(location, &value,
sizeof(Value));
347template <
class Value>
349typename std::enable_if<details::HasSerializeMember<Value>::value>::type
350ONIXS_ICEBOE_FORCEINLINE
354 value.serialize(location);
358template <
class Value>
359ONIXS_ICEBOE_FORCEINLINE
360typename std::enable_if<!details::HasValueStaticMember<Value>::value>::type
368template <
class Value>
369ONIXS_ICEBOE_FORCEINLINE
370typename std::enable_if<details::HasValueStaticMember<Value>::value>::type
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE_BEGIN
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE_END
#define ONIXS_ICEBOE_HOTPATH
#define ONIXS_ICEBOE_PURE
ONIXS_ICEBOE_FORCEINLINE std::enable_if< details::HasMemberTraits< Value >::value, Value >::type getValue(const void *location) noexcept(noexcept(makeFromTuple< Value >(CompositeExtractor< Value::MemberTraits::Count >::template extractAsTuple< Value >(location))))
constexpr std::enable_if<!details::HasMemberTraits< Value >::value, size_t >::type size() noexcept
ONIXS_ICEBOE_FORCEINLINE std::enable_if<!details::HasValueStaticMember< Value >::value >::type setValue(void *location, Value value) noexcept
UInt16 Word
Alias for Word.
UInt64 QWord
Alias for Quad Word.
ONIXS_ICEBOE_FORCEINLINE void * toOpaquePtr(Type *ptr) noexcept
Makes the pointer an opaque one.
ONIXS_ICEBOE_FORCEINLINE void * toMutable(const Type *ptr) noexcept
ONIXS_ICEBOE_FORCEINLINE Value extractValue(const void *location) noexcept
ONIXS_ICEBOE_FORCEINLINE Type * advanceByBytes(Type *pointer, ptrdiff_t distance) noexcept
Advances the pointer to a given offset (distance) in bytes.
UInt32 DWord
Alias for Double Word.
ONIXS_ICEBOE_FORCEINLINE Byte * toByteBlock(Type *ptr) noexcept
Reinterprets the pointer as a byte block one.
ONIXS_ICEBOE_FORCEINLINE ptrdiff_t byteDistance(Left *left, Right *right) noexcept
ONIXS_ICEBOE_FORCEINLINE Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance) noexcept
ONIXS_ICEBOE_FORCEINLINE std::enable_if<!details::HasSerializeMember< Value >::value >::type commitValue(void *location, Value value) noexcept
UInt8 Byte
Alias for Byte.