tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
479 stars 29 forks source link

Fix issue #52 #53

Closed tcbrindle closed 1 year ago

tcbrindle commented 1 year ago

reverse_adaptor needs to wrap the underlying cursor in order to provide a "reversed" operator<=> when the underlying cursor is ordered. To do so it uses an internal type called rev_cur.

Previously we were being cute and using CTAD to just call rev_cur(base_cur). But if base_cur itself is a specialisation of rev_cur then this will result in the base cursor being copy/move constructed rather than wrapped.

To avoid this issue we'll explicitly instantiate rev_cur<cursor_t<Base>>(base_cur) instead.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (69d5d93) 98.37% compared to head (30be972) 98.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #53 +/- ## ======================================= Coverage 98.37% 98.38% ======================================= Files 63 63 Lines 2280 2287 +7 ======================================= + Hits 2243 2250 +7 Misses 37 37 ``` | [Impacted Files](https://codecov.io/gh/tcbrindle/flux/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle) | Coverage Δ | | |---|---|---| | [include/flux/op/reverse.hpp](https://codecov.io/gh/tcbrindle/flux/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle#diff-aW5jbHVkZS9mbHV4L29wL3JldmVyc2UuaHBw) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://codecov.io/gh/tcbrindle/flux/pull/53/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tristan+Brindle)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.