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:
@@ -45,6 +45,15 @@ struct StdTuplePacker<Stream, Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Stream, typename Tuple>
|
||||
struct StdTuplePacker<Stream, Tuple, 0> {
|
||||
static void pack (
|
||||
packer<Stream>&,
|
||||
const Tuple&) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <typename Stream, typename... Args>
|
||||
const packer<Stream>& operator<< (
|
||||
packer<Stream>& o,
|
||||
@@ -75,6 +84,14 @@ struct StdTupleConverter<Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Tuple>
|
||||
struct StdTupleConverter<Tuple, 0> {
|
||||
static void convert (
|
||||
object const&,
|
||||
Tuple&) {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
object const& operator>> (
|
||||
object const& o,
|
||||
@@ -105,6 +122,14 @@ struct StdTupleToObjectWithZone<Tuple, 1> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Tuple>
|
||||
struct StdTupleToObjectWithZone<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