Merge pull request #605 from redboltz/fix_nonnull_warning

Fixed nonnull warnings on gcc 7.1.
This commit is contained in:
Takatoshi Kondo 2017-06-12 23:38:34 +09:00 committed by GitHub
commit f638e2186b
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>