mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-16 18:56:54 +02:00
Added size_equal_only support for C++03 msgpack::type::tuple.
This commit is contained in:
@@ -83,6 +83,7 @@ struct tuple<> {
|
||||
tuple() {}
|
||||
tuple(msgpack::object const& o) { o.convert(*this); }
|
||||
typedef tuple<> value_type;
|
||||
std::size_t size() const { return 0; }
|
||||
};
|
||||
|
||||
/// @cond
|
||||
@@ -90,6 +91,7 @@ struct tuple<> {
|
||||
template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||
struct tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> {
|
||||
typedef tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> value_type;
|
||||
std::size_t size() const { return <%=i+1%>; }
|
||||
tuple() {}
|
||||
tuple(typename tuple_type<A0>::transparent_reference _a0<%1.upto(i) {|j|%>, typename tuple_type<A<%=j%>>::transparent_reference _a<%=j%><%}%>) :
|
||||
a0(_a0)<%1.upto(i) {|j|%>, a<%=j%>(_a<%=j%>)<%}%> {}
|
||||
|
Reference in New Issue
Block a user