Re: override toString() for a tuple?

2014-06-04 Thread Steve D via Digitalmars-d-learn
On Wednesday, 4 June 2014 at 06:04:22 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: toString is a member of Tuple, and there's no way to override that externally. ... Hi Jonathan, Yeah, I'll probably just keep my locally cobbled version of typecons.d in my path. The other options

override toString() for a tuple?

2014-06-03 Thread Steve D via Digitalmars-d-learn
Is it possible to override std tuple's toString format? so that auto a = tuple(hello,1,2,3); writeln(a); prints (hello, 1, 2, 3) and not Tuple!(string, int, int, int)(hello, 1, 2, 3) I'm aware I could write a custom formatter function, but it would be nice not