I have an object with functions for getting the begin and end iterators:
const_iterator err_begin() const
const_iterator err_end() const
Because they are not named begin
and end
, I cannot pass my object directly to functions in range-v3.
Is there a simple wrapper I can use to make this object work with the range-v3 library?
For example:
auto hasErrors = !empty(something(x.err_begin(), x.err_end()));
In C++20 onwards, you're looking for
subrange
:If you're still using Ranges-v3, you'll want
iterator_range
: