Skip to content

Commit 6309450

Browse files
Use and_then
1 parent 3c68945 commit 6309450

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/rfl/parsing/Parser_span.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct Parser<R, W, std::span<T>, ProcessorsType> {
4040
} else {
4141
return Parser<R, W, std::vector<std::remove_cvref_t<T>>,
4242
ProcessorsType>::read(_r, _var)
43-
.transform([](std::vector<T>&& _vec) {
43+
.and_then([](std::vector<T>&& _vec) -> Result<std::span<T>> {
4444
using Type = std::remove_cvref_t<T>;
4545
Type* data = new (std::nothrow) Type[_vec.size()];
4646
if (!data) {

0 commit comments

Comments
 (0)