Perfect forwarding
Paul Backus
snarwin at gmail.com
Fri Jul 31 13:48:37 UTC 2020
On Friday, 31 July 2020 at 09:10:44 UTC, Chad Joan wrote:
>
> I am considering putting a "stringize" method in my types, with
> a signature (by convention) like so:
> @nogc nothrow void stringize(return scope StringVacuum writer)
> { ... }
>
Are you aware that toString already supports this kind of
overload?
The documentation for it is under `std.format.formatValue`, so it
is a bit easy to miss:
https://dlang.org/phobos/std_format.html#.formatValue
More information about the Digitalmars-d
mailing list