11 #ifndef MSGPACK_V1_TYPE_CPP11_FORWARD_LIST_HPP 12 #define MSGPACK_V1_TYPE_CPP11_FORWARD_LIST_HPP 18 #include <forward_list> 28 template <
typename T,
typename Alloc>
29 struct as<std::forward_list<T, Alloc>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
32 std::forward_list<T, Alloc> v;
37 v.push_front(p->
as<T>());
43 template <
typename T,
typename Alloc>
44 struct convert<std::forward_list<T, Alloc>> {
57 template <
typename T,
typename Alloc>
58 struct pack<std::forward_list<T, Alloc>> {
59 template <
typename Stream>
63 for(
auto const& e : v) o.
pack(e);
68 template <
typename T,
typename Alloc>
94 #endif // MSGPACK_V1_TYPE_CPP11_FORWARD_LIST_HPP uint32_t size
Definition: object_fwd.hpp:23
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:246
msgpack::object const & operator()(msgpack::object const &o, std::forward_list< T, Alloc > &v) const
Definition: forward_list.hpp:45
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
Definition: object_fwd_decl.hpp:62
union_type via
Definition: object_fwd.hpp:93
msgpack::zone & zone
Definition: object.hpp:36
std::forward_list< T, Alloc > operator()(msgpack::object const &o) const
Definition: forward_list.hpp:30
msgpack::object * ptr
Definition: object_fwd.hpp:24
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1160
Definition: adaptor_base.hpp:15
Definition: object.hpp:34
packer< Stream > & pack(const T &v)
Packing function template.
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::forward_list< T, Alloc > &v) const
Definition: forward_list.hpp:60
void operator()(msgpack::object::with_zone &o, const std::forward_list< T, Alloc > &v) const
Definition: forward_list.hpp:70
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition: object.hpp:593
Definition: adaptor_base.hpp:43
msgpack::enable_if< !msgpack::is_array< T >::value &&!msgpack::is_pointer< T >::value, T & >::type convert(T &v) const
Convert the object.
Definition: object.hpp:543
Definition: object_fwd.hpp:236
Definition: adaptor_base.hpp:32
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
msgpack::object_array array
Definition: object_fwd.hpp:85
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
msgpack::type::object_type type
Definition: object_fwd.hpp:92
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: object_fwd_decl.hpp:41
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
Definition: adaptor_base.hpp:27