inline MSGPACK_STD_TR1::unordered_multimap<K, V> operator>> (object o, MSGPACK_STD_TR1::unordered_multimap<K, V>& v) { if(o.type != type::MAP) { throw type_error(); } object_kv* p(o.via.map.ptr); object_kv* const pend(o.via.map.ptr + o.via.map.size); for(; p != pend; ++p) { std::pair<K, V> value; p->key.convert(&value.first); p->val.convert(&value.second); v.insert(value); } return v; }
clmdep_msgpack::object const& operator()(clmdep_msgpack::object const& o, MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>& v) const { if(o.type != clmdep_msgpack::type::MAP) { throw clmdep_msgpack::type_error(); } clmdep_msgpack::object_kv* p(o.via.map.ptr); clmdep_msgpack::object_kv* const pend(o.via.map.ptr + o.via.map.size); MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc> tmp; for(; p != pend; ++p) { std::pair<K, V> value; p->key.convert(value.first); p->val.convert(value.second); tmp.insert(value); } tmp.swap(v); return o; }