struct + writeln
Artur Skawina
art.08.09 at gmail.com
Sun Nov 18 06:48:45 PST 2012
On 11/18/12 14:15, Namespace wrote:
> Why are there so many copies of my struct if I give it to writeln?
> http://dpaste.dzfl.pl/414e7d93
> This problem occurs even if I have a 'toString' method.
phobos/writeln design issue. It just always blindly copies the things
it needs to print/format. Unnecessary copies is not even that big a problem
compared to what happens when the struct contains pointers and a non-trivial
toString method...
artur
More information about the Digitalmars-d-learn
mailing list