// // MessagePack for C++ static resolution routine // // Copyright (C) 2008-2015 FURUHASHI Sadayuki and KONDO Takatoshi // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef MSGPACK_V1_CPP11_MSGPACK_TUPLE_DECL_HPP #define MSGPACK_V1_CPP11_MSGPACK_TUPLE_DECL_HPP #include "msgpack/versioning.hpp" #include "msgpack/object_fwd.hpp" #include "msgpack/meta.hpp" #include namespace msgpack { /// @cond MSGPACK_API_VERSION_NAMESPACE(v1) { /// @endcond namespace type { // tuple using std::get; using std::tuple_size; using std::tuple_element; using std::uses_allocator; using std::ignore; using std::swap; template< class... Types > class tuple : public std::tuple { public: using base = std::tuple; tuple(tuple const&) = default; tuple(tuple&&) = default; template tuple(OtherTypes&&... other):base(std::forward(other)...) {} template tuple(tuple const& other):base(static_cast const&>(other)) {} template tuple(tuple && other):base(static_cast &&>(other)) {} tuple& operator=(tuple const&) = default; tuple& operator=(tuple&&) = default; template tuple& operator=(tuple const& other) { *static_cast(this) = static_cast const&>(other); return *this; } template tuple& operator=(tuple && other) { *static_cast(this) = static_cast &&>(other); return *this; } template< std::size_t I> typename tuple_element::type& get() & { return std::get(*this); } template< std::size_t I> typename tuple_element::type const& get() const& { return std::get(*this); } template< std::size_t I> typename tuple_element::type&& get() && { return std::get(*this); } std::size_t size() const { return sizeof...(Types); } }; template tuple make_tuple(Args&&... args); template tuple forward_as_tuple (Args&&... args) noexcept; template auto tuple_cat(Tuples&&... args) -> decltype( std::tuple_cat(std::forward::type::base>(args)...) ); template tuple tie(Args&... args); } // namespace type // --- Pack from tuple to packer stream --- template struct MsgpackTuplePacker; // --- Convert from tuple to object --- template struct MsgpackTupleAs; template struct MsgpackTupleAsImpl; template struct MsgpackTupleConverter; // --- Convert from tuple to object with zone --- template struct MsgpackTupleToObjectWithZone; /// @cond } // MSGPACK_API_VERSION_NAMESPACE(v1) ///@endcond } // namespace msgpack #endif // MSGPACK_V1_CPP11_MSGPACK_TUPLE_DECL_HPP