diff --git a/include/msgpack/adaptor/int.hpp b/include/msgpack/adaptor/int.hpp index c8f471c4..32f73ec3 100644 --- a/include/msgpack/adaptor/int.hpp +++ b/include/msgpack/adaptor/int.hpp @@ -27,7 +27,7 @@ namespace detail { template struct convert_integer_sign { - static inline T convert(msgpack::object const& o) { + static T convert(msgpack::object const& o) { if(o.type == msgpack::type::POSITIVE_INTEGER) { if(o.via.u64 > static_cast(std::numeric_limits::max())) { throw msgpack::type_error(); } @@ -43,7 +43,7 @@ namespace detail { template struct convert_integer_sign { - static inline T convert(msgpack::object const& o) { + static T convert(msgpack::object const& o) { if(o.type == msgpack::type::POSITIVE_INTEGER) { if(o.via.u64 > static_cast(std::numeric_limits::max())) { throw msgpack::type_error(); } @@ -69,7 +69,9 @@ namespace detail { template <> struct object_char_sign { - static inline void make(msgpack::object& o, char v) { + template + static typename msgpack::enable_if::value>::type + make(msgpack::object& o, T v) { if (v < 0) { o.type = msgpack::type::NEGATIVE_INTEGER; o.via.i64 = v; @@ -83,7 +85,7 @@ namespace detail { template <> struct object_char_sign { - static inline void make(msgpack::object& o, char v) { + static void make(msgpack::object& o, char v) { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } };