Currently filter_adaptor uses the same cursor type as its parent sequence, unmodified. This works fine, but can lead to odd situations where using a parent cursor (such as an integer index for a vector, say) on the filtered sequence appears to "ignore" the filter:
Currently
filter_adaptor
uses the same cursor type as its parent sequence, unmodified. This works fine, but can lead to odd situations where using a parent cursor (such as an integer index for a vector, say) on the filtered sequence appears to "ignore" the filter:Godbolt
To avoid this,
filter_adaptor
should wrap its underlying cursor as something liketo turn the last line above into a compile error.