Skip to content

Commit bd511a4

Browse files
committed
Fixed nonnull warnings on gcc 7.1.
1 parent 7214b4c commit bd511a4

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

include/msgpack/v1/adaptor/cpp11/array_char.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ struct convert<std::array<char, N>> {
4545
}
4646
};
4747

48+
template <>
49+
struct convert<std::array<char, 0>> {
50+
msgpack::object const& operator()(msgpack::object const& o, std::array<char, 0>&) const {
51+
return o;
52+
}
53+
};
54+
4855
template <std::size_t N>
4956
struct pack<std::array<char, N>> {
5057
template <typename Stream>

include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ struct convert<std::array<unsigned char, N>> {
4545
}
4646
};
4747

48+
template <>
49+
struct convert<std::array<unsigned char, 0>> {
50+
msgpack::object const& operator()(msgpack::object const& o, std::array<unsigned char, 0>&) const {
51+
return o;
52+
}
53+
};
54+
4855
template <std::size_t N>
4956
struct pack<std::array<unsigned char, N>> {
5057
template <typename Stream>

0 commit comments

Comments
 (0)