Skip to content
Snippets Groups Projects
Commit 94bfc677 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

value: add non-static unpack<T>()

parent d5ed6ca8
No related branches found
No related tags found
No related merge requests found
......@@ -221,6 +221,12 @@ struct Value
return unpackMsg<T>(v.data);
}
template <typename T>
T unpack()
{
return unpack<T>(*this);
}
bool isEncrypted() const {
return not cypher.empty();
}
......@@ -261,6 +267,9 @@ struct Value
Value(const Type& vs)
: Value(pack<Type>(vs)) {}
/**
* Unpack a serialized value
*/
Value(const msgpack::object& o) {
msgpack_unpack(o);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment