Replaced zone* member variable in object with zone&.

Added msgpack::object::with_zone tests.
Added tuples operator<<'s parameter to const.
Fixed array object::with_zone pointer and size unset problem.
Fixed forward_list object::with_zone pointer and size unset problem.
This commit is contained in:
Takatoshi Kondo
2014-08-11 13:23:27 +09:00
parent 8920c49597
commit f969f6f39c
38 changed files with 818 additions and 1839 deletions

View File

@@ -172,9 +172,9 @@ struct MsgpackTupleToObjectWithZone<Tuple, 1> {
template <typename... Args>
inline void operator<< (
object::with_zone& o,
type::tuple<Args...>& v) {
type::tuple<Args...> const& v) {
o.type = type::ARRAY;
o.via.array.ptr = static_cast<object*>(o.zone->allocate_align(sizeof(object)*sizeof...(Args)));
o.via.array.ptr = static_cast<object*>(o.zone.allocate_align(sizeof(object)*sizeof...(Args)));
o.via.array.size = sizeof...(Args);
MsgpackTupleToObjectWithZone<decltype(v), sizeof...(Args)>::convert(o, v);
}