diff --git a/src/EnumConverter.h b/src/EnumConverter.h index e67e439..53ce691 100644 --- a/src/EnumConverter.h +++ b/src/EnumConverter.h @@ -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 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) {