diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 23:42:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 23:42:07 +0100 |
commit | 4d9a82b720c8ce74b94f43f72ddd819ef21abbdf (patch) | |
tree | c0a5d21b8e19fbb60c286faec8e302e6f32b6679 /serialize/binary-serializer.hpp | |
parent | 32b8c22828315292857e2cd9909fba620f30ff70 (diff) |
pre-declare integer types without cstddef/cstdint
Diffstat (limited to 'serialize/binary-serializer.hpp')
-rw-r--r-- | serialize/binary-serializer.hpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/serialize/binary-serializer.hpp b/serialize/binary-serializer.hpp index 338173c2..f277aae9 100644 --- a/serialize/binary-serializer.hpp +++ b/serialize/binary-serializer.hpp @@ -1,7 +1,5 @@ #pragma once -#include <cstddef> -#include <cstdint> #include <bit> #include <concepts> #include <type_traits> @@ -10,14 +8,14 @@ namespace floormat::Serialize { static_assert(std::endian::native == std::endian::big || std::endian::native == std::endian::little); -template<std::size_t N> struct make_integer; -template<std::size_t N> using make_integer_t = typename make_integer<N>::type; +template<size_t N> struct make_integer; +template<size_t N> using make_integer_t = typename make_integer<N>::type; #define FM_SERIALIZE_MAKE_INTEGER(T) template<> struct make_integer<sizeof(T)> { using type = T; } -FM_SERIALIZE_MAKE_INTEGER(std::uint8_t); -FM_SERIALIZE_MAKE_INTEGER(std::uint16_t); -FM_SERIALIZE_MAKE_INTEGER(std::uint32_t); -FM_SERIALIZE_MAKE_INTEGER(std::uint64_t); +FM_SERIALIZE_MAKE_INTEGER(uint8_t); +FM_SERIALIZE_MAKE_INTEGER(uint16_t); +FM_SERIALIZE_MAKE_INTEGER(uint32_t); +FM_SERIALIZE_MAKE_INTEGER(uint64_t); #undef FN_SERIALIZE_MAKE_INTEGER template<typename T> |