Use free function instead of recursive std::function
An std::function requires type erasure and thus a memory allocation that is not needed here at all. Instead, just use a free function. While at it, introduce FormatRange to replace the std::pair too.
Please register or sign in to comment