[static] foreach scope, template declaration ?

SlomoTheBrave via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 26 17:21:19 PDT 2014


On Friday, 26 September 2014 at 11:16:01 UTC, Mathias LANG wrote:
> On Thursday, 25 September 2014 at 23:08:53 UTC, SlomoTheBrave 
> wrote:
>> a way around this is not to use anySatisfy nor the template, 
>> for example this works as expected:
>>
>> [...]
>>
>
> My problem is that in this example, attributes are in the same 
> order as the parameter. But this come from a code generator, 
> which takes class defined by the user, so I have to assume they 
> might not be in the correct order :)
>

Your problem is that you absolutely want to do some idiomatic D2 
with std, instead, using a home-cooked static function it would 
work fine, as demonstrated by my example (currently you use an 
eponyme template, so basically it's just a function). If your aim 
is to highlight a bug then fill a bug report.


More information about the Digitalmars-d-learn mailing list