diff options
Diffstat (limited to 'serialize/binary-serializer.hpp')
| -rw-r--r-- | serialize/binary-serializer.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/serialize/binary-serializer.hpp b/serialize/binary-serializer.hpp index 43fffea8..66281cc1 100644 --- a/serialize/binary-serializer.hpp +++ b/serialize/binary-serializer.hpp @@ -41,9 +41,16 @@ concept integer = requires(T x) { template<typename T> concept serializable = requires(T x) { + requires std::same_as<T, std::decay_t<T>>; requires std::floating_point<T> || integer<T>; }; +template<typename T> +constexpr inline T maybe_byteswap(T x) +{ + return x; +} + template<integer T> constexpr inline T maybe_byteswap(T x) { |
