Added reference to return value.

This commit is contained in:
Takatoshi Kondo 2014-08-10 22:04:31 +09:00
parent 9a1ccaf155
commit b2f5893669
2 changed files with 4 additions and 6 deletions

View File

@ -94,7 +94,7 @@ inline void operator<< (object::with_zone& o, const type::assoc_vector<K,V>& 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(); }
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>
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(); }
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
#endif /* msgpack/type/map.hpp */

View File

@ -44,7 +44,7 @@ namespace msgpack {
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(); }
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>
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(); }
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
#endif /* msgpack/type/map.hpp */