so since we don't have a proper search till c++20:http://ix.io/3nAa/cppgotta love the do-if-while.
shame ix.io html doesn't highlight the if though, so maybecurl ix.io/3nAa+cppinstead.
the rage type is just a simple aggregate that holds the two iterators and provides the usual begin-end interface, no magic there.
#cpp
of course I notice a horrible out of bound read right after positng -_-
but it passed the tests, even with address sanitizer :v
because tests were on c-strings that and null terminators saved them -_-
fixedhttp://ix.io/3nAq/cpp
but now it look a lot more like the cppreference example implementation... so much for trying to be original and stylish...
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.
fixed
http://ix.io/3nAq/cpp
but now it look a lot more like the cppreference example implementation... so much for trying to be original and stylish...