mirror of
https://github.com/boostorg/mysql.git
synced 2026-02-20 14:52:25 +00:00
Added (de)serialization tests for all basic types
This commit is contained in:
@@ -307,7 +307,7 @@ void serialize(T input, SerializationContext& ctx) noexcept
|
||||
template <typename T, typename=std::enable_if_t<std::is_enum_v<T>>>
|
||||
std::size_t get_size(T input, const SerializationContext&) noexcept
|
||||
{
|
||||
return get_fixed_size<std::underlying_type_t<T>>::value;
|
||||
return get_fixed_size<ValueHolder<std::underlying_type_t<T>>>::value;
|
||||
}
|
||||
|
||||
// Tuple-like messages
|
||||
|
||||
@@ -19,6 +19,9 @@ struct ValueHolder
|
||||
using value_type = T;
|
||||
|
||||
value_type value;
|
||||
|
||||
bool operator==(const ValueHolder<T>& rhs) const { return value == rhs.value; }
|
||||
bool operator!=(const ValueHolder<T>& rhs) const { return value != rhs.value; }
|
||||
};
|
||||
|
||||
struct int1 : ValueHolder<std::uint8_t> {};
|
||||
|
||||
Reference in New Issue
Block a user