martinzink commented on code in PR #1926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1926#discussion_r2032721712
##########
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:
yeah the use case is new and I think it wasnt tested this way
--
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]