Added * and -> operators to object_handle

This commit is contained in:
sztomi
2017-10-09 20:23:25 +02:00
parent b02c6beb4d
commit d452625ed1
2 changed files with 21 additions and 0 deletions

View File

@@ -70,6 +70,18 @@ public:
const msgpack::object& get() const
{ return m_obj; }
/**
* @return object (to mimic smart pointers).
*/
const msgpack::object& operator*() const
{ return get(); }
/**
* @return the address of the object (to mimic smart pointers).
*/
const msgpack::object* operator->() const
{ return &get(); }
/// Get unique_ptr reference of zone.
/**
* @return unique_ptr reference of zone