how do YOU split?
old code new question: can you spot the undefined behaviour? omg! and how can I ever recover from this?
@freemo nah, std::search takes care of that, it works with ranges that you specify using begin and end iterators/pointers, a very c++ thing. The split itself works fine and handles all the edge cases, it just has undefined behaviour, which you can't identify in any way other than sheer unbridled pedantry.
@namark hmmm...