Fixed nonnull warnings on gcc 7.1.

This commit is contained in:
Takatoshi Kondo 2017-06-12 15:14:37 +09:00
parent 7214b4c73f
commit bd511a4bd1
2 changed files with 14 additions and 0 deletions

View File

@ -45,6 +45,13 @@ struct convert<std::array<char, N>> {
} }
}; };
template <>
struct convert<std::array<char, 0>> {
msgpack::object const& operator()(msgpack::object const& o, std::array<char, 0>&) const {
return o;
}
};
template <std::size_t N> template <std::size_t N>
struct pack<std::array<char, N>> { struct pack<std::array<char, N>> {
template <typename Stream> template <typename Stream>

View File

@ -45,6 +45,13 @@ struct convert<std::array<unsigned char, N>> {
} }
}; };
template <>
struct convert<std::array<unsigned char, 0>> {
msgpack::object const& operator()(msgpack::object const& o, std::array<unsigned char, 0>&) const {
return o;
}
};
template <std::size_t N> template <std::size_t N>
struct pack<std::array<unsigned char, N>> { struct pack<std::array<unsigned char, N>> {
template <typename Stream> template <typename Stream>