It would be good to add a short comment explaining the purpose of this setup (to enable the user to pass any string->string transformation, be it a function or an arbitrary type as long as it defines operator() with the appropriate signature.)