Skip to content

Commit 8fe2f56

Browse files
authored
TODO Update OneOf.hpp
1 parent f4678cf commit 8fe2f56

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/rfl/OneOf.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ struct OneOf {
4343
static rfl::Result<T> validate_impl(const T& _value,
4444
std::vector<Error> _errors) {
4545
return Head::validate(_value)
46-
.and_then([&](auto&& [[maybe_unused]] _result) -> rfl::Result<T> {
46+
.and_then([&](auto&& _result) -> rfl::Result<T> {
4747
if constexpr (sizeof...(Tail) == 0) {
4848
if (_errors.size() == sizeof...(Cs)) {
4949
return _value;
50+
// The AI suggests return std::forward<decltype(_result)>(_result);
51+
// is it correct in this context?
5052
}
5153
return error(make_error_message(_errors));
5254
} else {

0 commit comments

Comments
 (0)