Go to the documentation of this file.
11 #ifndef MSGPACK_V1_TYPE_CPP11_UNIQUE_PTR_HPP
12 #define MSGPACK_V1_TYPE_CPP11_UNIQUE_PTR_HPP
29 struct as<std::
unique_ptr<T>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
32 return std::unique_ptr<T>(
new T(o.
as<T>()));
50 template <
typename Stream>
82 #endif // MSGPACK_V1_TYPE_CPP11_UNIQUE_PTR_HPP
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
Definition: adaptor_base.hpp:43
Definition: adaptor_base.hpp:15
Definition: adaptor_base.hpp:27
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: object_fwd_decl.hpp:62
Definition: adaptor_base.hpp:38
void operator()(msgpack::object::with_zone &o, const std::unique_ptr< T > &v) const
Definition: unique_ptr.hpp:68
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
void operator()(msgpack::object &o, const std::unique_ptr< T > &v) const
Definition: unique_ptr.hpp:60
packer< Stream > & pack(const T &v)
Packing function template.
@ NIL
Definition: object_fwd_decl.hpp:29
Definition: cpp_config_decl.hpp:47
msgpack::object const & operator()(msgpack::object const &o, std::unique_ptr< T > &v) const
Definition: unique_ptr.hpp:38
Definition: adaptor_base.hpp:32
packer< Stream > & pack_nil()
Packing nil.
Definition: pack.hpp:1135
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition: object.hpp:1121
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::unique_ptr< T > &v) const
Definition: unique_ptr.hpp:51
bool is_nil() const
Cheking nil.
Definition: object_fwd.hpp:99
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
Definition: object.hpp:35
msgpack::type::object_type type
Definition: object_fwd.hpp:92
std::unique_ptr< T > operator()(msgpack::object const &o) const
Definition: unique_ptr.hpp:30