Closed joshuak94 closed 2 years ago
@eseiler Do you know why the following gives an error on gcc10:
| std::views::filter([start](auto & rec) {return !unmapped(rec);})
| std::views::filter([start](auto & rec) {return std::make_tuple(rec.reference_id().value(), get_length((rec).cigar_sequence()) + rec.reference_position().value()) >= start;})
```cpp
But then this doesn't:
```cpp
| std::views::filter([start](auto & rec) {return !unmapped(rec) && std::make_tuple(rec.reference_id().value(), get_length((rec).cigar_sequence()) + rec.reference_position().value()) >= start;})
I'm not sure, probably some quirk :D
The second version is better anyway, since you only need to create one filter, and the condition is short-circuited, i.e., if !unmapped(rec)
is false, the rest is not evaluated.
Good catch, thanks!
Fixed two bugs: