6 Apr
2014
6 Apr
'14
7:52 p.m.
Wouldn't the library be well served by providing a contains() algorithm - with the same overloads/versions as find - for unsorted ranges? Surely, having to test against the range's end ruins the otherwise expressive syntax offered; especially when adaptors are involved and one has to test against the adapted range's end. Perhaps I am missing an obvious reason why not?
I can't think of a reason. In my code I wrote my own version of this function and I use it all the time. If you're interested in contributing such a function to Boost.Range (including tests and documentation), I'd be happy to review it. Regards, Nate