Creating Anonymous structs
Adam D. Ruppe
destructionator at gmail.com
Sat May 18 20:03:14 UTC 2019
On Saturday, 18 May 2019 at 15:59:05 UTC, Alex wrote:
> Structs combine data, I have a use case where I do not want to
> litter the scope with variables and would like to put them in a
> struct but the variable will only be used once.
This is basically what Phobos's Tuple is.
auto x = tuple(value_for_x, value_for_y);
http://dpldocs.info/experimental-docs/std.typecons.tuple.html
More information about the Digitalmars-d-learn
mailing list