1 #ifndef ZSERIO_EXTENDED_H_INC
2 #define ZSERIO_EXTENDED_H_INC
12 template <
typename T,
typename... ARGS>
13 struct is_single_type : std::false_type
16 template <
typename T,
typename A1>
17 struct is_single_type<T, A1> : std::is_same<T, std::decay_t<A1>>
20 template <
typename T,
typename... ARGS>
21 inline constexpr
bool is_single_type_v = is_single_type<T, ARGS...>::value;
37 template <
typename ALLOC>
39 m_isPresent(other.m_isPresent),
40 m_value(
std::move(other.m_value), allocator)
45 template <
typename ALLOC>
47 m_isPresent(other.m_isPresent),
48 m_value(other.m_value, allocator)
54 template <
typename... ARGS,
55 typename = std::enable_if_t<!detail::is_single_type_v<
Extended, ARGS...> &&
56 std::is_constructible_v<T, ARGS...>>>
58 m_value(
std::forward<ARGS>(args)...)
71 constexpr
const T&
value() const noexcept
131 constexpr
explicit operator bool() const noexcept
161 m_isPresent = present;
165 bool m_isPresent =
true;
169 template <
typename T>
179 template <
typename T>
182 return !(lhs == rhs);
185 template <
typename T>
195 template <
typename T>
205 template <
typename T>
211 template <
typename T>
225 template <
typename T>
228 uint32_t result = seed;
241 template <
typename T>
bool isPresent() const noexcept
Extended & operator=(Extended &&other)=default
const T * operator->() const noexcept
constexpr Extended(ARGS &&... args)
constexpr const T & value() const noexcept
constexpr const T & operator*() const noexcept
void setPresent(bool present) noexcept
T * operator->() noexcept
Extended & operator=(const Extended &other)=default
Extended(Extended &&other)=default
constexpr T & operator*() noexcept
Extended(Extended &&other, const ALLOC &allocator)
Extended(const Extended &other)=default
Extended(const Extended &other, const ALLOC &allocator)
bool operator>(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
bool operator==(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
bool operator<(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
uint32_t calcHashCode(uint32_t seedValue, const ArrayView< T, ARRAY_TRAITS > &array)
bool operator<=(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
bool operator>=(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
bool operator!=(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
size_t operator()(const zserio::Extended< T > &extendedValue) const