mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
cpp: add missing msgpack::type::make_tuple()
This commit is contained in:
parent
b4cb5e23c0
commit
be32e3b1fb
@ -64,7 +64,6 @@ struct tuple_type<const T&> {
|
|||||||
typedef const T& transparent_reference;
|
typedef const T& transparent_reference;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||||
<%0.upto(i) {|j|%>
|
<%0.upto(i) {|j|%>
|
||||||
template <typename A0<%1.upto(i) {|k|%>, typename A<%=k%><%}%>>
|
template <typename A0<%1.upto(i) {|k|%>, typename A<%=k%><%}%>>
|
||||||
@ -78,7 +77,6 @@ private:
|
|||||||
<%}%>
|
<%}%>
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
|
|
||||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||||
<%0.upto(i) {|j|%>
|
<%0.upto(i) {|j|%>
|
||||||
template <typename A0<%1.upto(i) {|k|%>, typename A<%=k%><%}%>>
|
template <typename A0<%1.upto(i) {|k|%>, typename A<%=k%><%}%>>
|
||||||
@ -91,16 +89,6 @@ private:
|
|||||||
<%}%>
|
<%}%>
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
|
|
||||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
|
||||||
template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
|
||||||
tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(typename tuple_type<A0>::transparent_reference a0<%1.upto(i) {|j|%>, typename tuple_type<A<%=j%>>::transparent_reference a<%=j%><%}%>)
|
|
||||||
{
|
|
||||||
return tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>>(a0<%1.upto(i) {|j|%>, a<%=j%><%}%>);
|
|
||||||
}
|
|
||||||
<%}%>
|
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct tuple<> {
|
struct tuple<> {
|
||||||
typedef tuple<> value_type;
|
typedef tuple<> value_type;
|
||||||
@ -122,6 +110,18 @@ struct tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> {
|
|||||||
};
|
};
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
|
inline tuple<> make_tuple()
|
||||||
|
{
|
||||||
|
return tuple<>();
|
||||||
|
}
|
||||||
|
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||||
|
template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||||
|
tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(typename tuple_type<A0>::transparent_reference a0<%1.upto(i) {|j|%>, typename tuple_type<A<%=j%>>::transparent_reference a<%=j%><%}%>)
|
||||||
|
{
|
||||||
|
return tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>>(a0<%1.upto(i) {|j|%>, a<%=j%><%}%>);
|
||||||
|
}
|
||||||
|
<%}%>
|
||||||
|
|
||||||
} // namespace type
|
} // namespace type
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,6 @@ type::tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>>& operator>> (
|
|||||||
}
|
}
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
|
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
const packer<Stream>& operator<< (
|
const packer<Stream>& operator<< (
|
||||||
packer<Stream>& o,
|
packer<Stream>& o,
|
||||||
@ -164,7 +163,6 @@ const packer<Stream>& operator<< (
|
|||||||
}
|
}
|
||||||
<%}%>
|
<%}%>
|
||||||
|
|
||||||
|
|
||||||
} // namespace msgpack
|
} // namespace msgpack
|
||||||
|
|
||||||
#endif /* msgpack/type/tuple.hpp */
|
#endif /* msgpack/type/tuple.hpp */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user