Adam D. Ruppe wrote:
On Saturday, 29 September 2012 at 02:11:12 UTC, Alex Rønne Petersen wrote:
While the idea is reasonable, the problem then becomes that if you
accidentally pass a non-zero terminated char* to %sz, all hell breaks
loose just like with printf.

That's the same risk with to!string(), yes? We aren't really losing
anything by adding it.

Also this reminds me of the utter uselessness of the current behavior of
"%s" and a pointer - it prints the address.

Why not specialize current "%s" for character pointer types so it will print null terminated strings? It's always possible to cast to void* to print an address.

Reply via email to