szaszm commented on code in PR #1926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1926#discussion_r2031611580


##########
utils/include/utils/expected.h:
##########
@@ -176,11 +177,26 @@ auto operator|(Expected&& object, 
transform_error_wrapper<F> f) {
   static_assert(valid_unexpected_type<transformed_error_type>, "transformError 
expects a function returning a valid unexpected type");
   using transformed_expected_type = nonstd::expected<value_type, 
transformed_error_type>;
   if (object.has_value()) {
-    return transformed_expected_type{std::forward<Expected>(object)};
+    return transformed_expected_type{std::forward<Expected>(object).value()};

Review Comment:
   but it did compile before, didn't it? I mean I'm fine with the new version, 
it's just weird that the old version was building fine, but now it needs the 
change. Or maybe this overload was not instantiated and not tested?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to