mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-22 16:02:30 +02:00
Added zero size tuple support.
This commit is contained in:
@@ -109,6 +109,14 @@ struct MsgpackTuplePacker<Stream, Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Stream, typename Tuple>
|
||||
struct MsgpackTuplePacker<Stream, Tuple, 0> {
|
||||
static void pack (
|
||||
packer<Stream>&,
|
||||
const Tuple&) {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Stream, typename... Args>
|
||||
const packer<Stream>& operator<< (
|
||||
packer<Stream>& o,
|
||||
@@ -139,6 +147,14 @@ struct MsgpackTupleConverter<Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Tuple>
|
||||
struct MsgpackTupleConverter<Tuple, 0> {
|
||||
static void convert (
|
||||
object const&,
|
||||
Tuple&) {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
object const& operator>> (
|
||||
object const& o,
|
||||
@@ -169,6 +185,14 @@ struct MsgpackTupleToObjectWithZone<Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Tuple>
|
||||
struct MsgpackTupleToObjectWithZone<Tuple, 0> {
|
||||
static void convert (
|
||||
object::with_zone&,
|
||||
const Tuple&) {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
inline void operator<< (
|
||||
object::with_zone& o,
|
||||
|
Reference in New Issue
Block a user