non-deterministic parameter evaluation causes the erased range to be empty. use std::next for the end of the range.