mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-23 16:52:45 +02:00
Added reference to return value.
This commit is contained in:
parent
9a1ccaf155
commit
b2f5893669
@ -94,7 +94,7 @@ inline void operator<< (object::with_zone& o, const type::assoc_vector<K,V>& v)
|
|||||||
|
|
||||||
|
|
||||||
template <typename K, typename V>
|
template <typename K, typename V>
|
||||||
inline std::map<K, V> operator>> (object const& o, std::map<K, V>& v)
|
inline std::map<K, V>& operator>> (object const& o, std::map<K, V>& v)
|
||||||
{
|
{
|
||||||
if(o.type != type::MAP) { throw type_error(); }
|
if(o.type != type::MAP) { throw type_error(); }
|
||||||
object_kv* p(o.via.map.ptr);
|
object_kv* p(o.via.map.ptr);
|
||||||
@ -150,7 +150,7 @@ inline void operator<< (object::with_zone& o, const std::map<K,V>& v)
|
|||||||
|
|
||||||
|
|
||||||
template <typename K, typename V>
|
template <typename K, typename V>
|
||||||
inline std::multimap<K, V> operator>> (object const& o, std::multimap<K, V>& v)
|
inline std::multimap<K, V>& operator>> (object const& o, std::multimap<K, V>& v)
|
||||||
{
|
{
|
||||||
if(o.type != type::MAP) { throw type_error(); }
|
if(o.type != type::MAP) { throw type_error(); }
|
||||||
object_kv* p(o.via.map.ptr);
|
object_kv* p(o.via.map.ptr);
|
||||||
@ -202,4 +202,3 @@ inline void operator<< (object::with_zone& o, const std::multimap<K,V>& v)
|
|||||||
} // namespace msgpack
|
} // namespace msgpack
|
||||||
|
|
||||||
#endif /* msgpack/type/map.hpp */
|
#endif /* msgpack/type/map.hpp */
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ namespace msgpack {
|
|||||||
|
|
||||||
|
|
||||||
template <typename K, typename V>
|
template <typename K, typename V>
|
||||||
inline MSGPACK_STD_TR1::unordered_map<K, V> operator>> (object o, MSGPACK_STD_TR1::unordered_map<K, V>& v)
|
inline MSGPACK_STD_TR1::unordered_map<K, V>& operator>> (object o, MSGPACK_STD_TR1::unordered_map<K, V>& v)
|
||||||
{
|
{
|
||||||
if(o.type != type::MAP) { throw type_error(); }
|
if(o.type != type::MAP) { throw type_error(); }
|
||||||
object_kv* p(o.via.map.ptr);
|
object_kv* p(o.via.map.ptr);
|
||||||
@ -93,7 +93,7 @@ inline void operator<< (object::with_zone& o, const MSGPACK_STD_TR1::unordered_m
|
|||||||
|
|
||||||
|
|
||||||
template <typename K, typename V>
|
template <typename K, typename V>
|
||||||
inline MSGPACK_STD_TR1::unordered_multimap<K, V> operator>> (object o, MSGPACK_STD_TR1::unordered_multimap<K, V>& v)
|
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(); }
|
if(o.type != type::MAP) { throw type_error(); }
|
||||||
object_kv* p(o.via.map.ptr);
|
object_kv* p(o.via.map.ptr);
|
||||||
@ -147,4 +147,3 @@ inline void operator<< (object::with_zone& o, const MSGPACK_STD_TR1::unordered_m
|
|||||||
#undef MSGPACK_STD_TR1
|
#undef MSGPACK_STD_TR1
|
||||||
|
|
||||||
#endif /* msgpack/type/map.hpp */
|
#endif /* msgpack/type/map.hpp */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user