Re: Filtering a tuple of containers with indices

2015-11-17 Thread anonymous via Digitalmars-d-learn
On 17.11.2015 15:32, maik klein wrote: template tupIndexToRange(alias Tup, Indices...){ [snip] I don't quite understand how that code is supposed to work. Maybe there's just some detail missing, but it could also be that your approach can't work. This is roughly what I want to achieve

Filtering a tuple of containers with indices

2015-11-17 Thread maik klein via Digitalmars-d-learn
The question is also posted on https://stackoverflow.com/questions/33757981/filtering-a-tuple-of-containers-with-indicies template tupIndexToRange(alias Tup, Indices...){ import std.meta; static if(Indicies.length == 0){ alias tupIndexToRange = AliasSeq!(); } else{ alias

Re: Filtering a tuple of containers with indices

2015-11-17 Thread maik klein via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 15:48:10 UTC, anonymous wrote: On 17.11.2015 15:32, maik klein wrote: [...] [snip] I don't quite understand how that code is supposed to work. Maybe there's just some detail missing, but it could also be that your approach can't work. [...] Thanks but I

Re: Filtering a tuple of containers with indices

2015-11-17 Thread anonymous via Digitalmars-d-learn
On 17.11.2015 20:46, maik klein wrote: .selectFromTuple!(0, 1).expand Does this result in a copy? I avoided doing it like this because I was worried that I would copy every array. But I also don't fully understand when D will copy. Yes and no. It copies the Array structs, but it does not copy