Allow Result to be constructed with an l-value
This fixes compile errors on old C++ compilers
This commit is contained in:
parent
6d97cbd2b6
commit
41df6d94b7
1 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,8 @@ struct Result {
|
|||
std::string error;
|
||||
|
||||
inline Result() : error("Empty") {}
|
||||
inline Result(Value &&v) : value(v) {}
|
||||
inline Result(const Value &v) : value(v) {}
|
||||
inline Result(Value &&v) : value(std::move(v)) {}
|
||||
inline Result(const std::string &message) : error(message) {}
|
||||
inline Result(const char *message) : error(message) {}
|
||||
inline bool ok() const { return error.empty(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue