0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 00:34:18 +01:00

ircd::json: Add tuple construction from a different tuple object.

This commit is contained in:
Jason Volk 2017-10-27 12:25:39 -07:00
parent 2ce9b0521f
commit 4ae58a4f46

View file

@ -68,6 +68,7 @@ struct tuple
static constexpr size_t size();
template<class... U> tuple(const tuple<U...> &);
tuple(const json::object &);
tuple(const json::iov &);
tuple(const std::initializer_list<member> &);
@ -796,6 +797,17 @@ tuple<T...>::tuple(const std::initializer_list<member> &members)
});
}
template<class... T>
template<class... U>
tuple<T...>::tuple(const tuple<U...> &t)
{
for_each(t, [this]
(const auto &key, const auto &val)
{
set(*this, key, val);
});
}
template<class tuple,
class it_a,
class it_b,