10 #ifndef MSGPACK_V2_X3_UNPACK_HPP
11 #define MSGPACK_V2_X3_UNPACK_HPP
13 #if defined(MSGPACK_USE_X3_PARSE)
15 #include <boost/version.hpp>
17 #if BOOST_VERSION >= 106100
32 template <
typename Iterator>
37 unpack_limit
const& limit)
39 create_object_visitor v(f, user_data, limit);
40 v.set_zone(result_zone);
42 v.set_referenced(referenced);
43 if (!
parse(std::forward<Iterator>(
begin), std::forward<Iterator>(
end), v)) {
46 referenced = v.referenced();
53 template <
typename Iterator>
58 unpack_limit
const& limit)
64 std::forward<Iterator>(
begin), std::forward<Iterator>(
end), *z, obj, referenced, f, user_data, limit);
68 template <
typename Iterator>
72 unpack_limit
const& limit)
75 return unpack(std::forward<Iterator>(
begin), std::forward<Iterator>(
end), referenced, f, user_data, limit);
78 template <
typename Iterator>
84 unpack_limit
const& limit)
89 std::forward<Iterator>(
begin), std::forward<Iterator>(
end), z, obj, referenced, f, user_data, limit);
93 template <
typename Iterator>
98 unpack_limit
const& limit)
102 z, std::forward<Iterator>(
begin), std::forward<Iterator>(
end), referenced, f, user_data, limit);
114 #error Boost 1.61.0 or later is required to use x3 parse
The class holds object and zone.
Definition: object.hpp:44
Definition: cpp03_zone.hpp:31
parse_return unpack_imp(const char *data, std::size_t len, std::size_t &off, msgpack::zone &result_zone, msgpack::object &result, bool &referenced, unpack_reference_func f=MSGPACK_NULLPTR, void *user_data=MSGPACK_NULLPTR, unpack_limit const &limit=unpack_limit())
Definition: unpack.hpp:1353
Definition: adaptor_base.hpp:15
bool(* unpack_reference_func)(msgpack::type::object_type type, std::size_t size, void *user_data)
The type of reference or copy judging function.
Definition: unpack_decl.hpp:74
msgpack::object_kv * end(msgpack::object_map &map)
Definition: iterator.hpp:25
msgpack::object_kv * begin(msgpack::object_map &map)
Definition: iterator.hpp:23
bool parse(const char *data, size_t len, size_t &off, Visitor &v)
Unpack msgpack formatted data via a visitor.
msgpack::object_handle unpack(const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f, void *user_data, unpack_limit const &limit)
Unpack msgpack::object from a buffer.
Definition: unpack.hpp:1397
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
Definition: unpack_exception.hpp:34
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66