How to make a struct containing an associative array to deeply copy (for repeated usage in foreach) ?
Monkyyy
crazymonkyyy at gmail.com
Thu Mar 14 17:06:09 UTC 2024
On Thursday, 14 March 2024 at 16:32:10 UTC, rkompass wrote:
> On Thursday, 14 March 2024 at 16:12:00 UTC, rkompass wrote:
> Hello @monkyyy again,
>
> your solution is much more elegant:-) No need to do a deep copy.
> I was thinking about a way to achieve that but had no clue.
>
> I will study opSlice now.
>
> Your definition of tuple is somewhat obscure to me.
> Is this compatible with the Tuple from `std.typecons`?
>
> Greetings,
> Raul
Std.tuple is a gaint mess if there's differences in usage syntax
they are very stupid tradeoffs; fundementally the base languge
has allot of syntax sugar for "aliasSeq" and my definition of
tuple is sticking an Seq into a struct; if you look at the code
for std.tuple it will do the same thing under the name "expand"
If you go down the rabbit hole of learning the template syntax
you should start with the systax aviable for seq's and 95% of it
will apply to that definition of tuple
More information about the Digitalmars-d-learn
mailing list