Replaced calls to boost::optional<T>.value() with operator*

Boost 1.54 doesn't support value() yet, plus * is cleaner
This commit is contained in:
Daniel Wolf 2016-09-08 22:05:11 +02:00
parent 6d321d2428
commit d98de34b98
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public:
throw std::invalid_argument(fmt::format("{} is not a valid {} value.", numericValue, typeName));
}
return result.value();
return *result;
}
virtual boost::optional<TEnum> tryParse(const std::string& s) {
@ -51,7 +51,7 @@ public:
throw std::invalid_argument(fmt::format("{} is not a valid {} value.", s, typeName));
}
return result.value();
return *result;
}
std::ostream& write(std::ostream& stream, TEnum value) {