On 2015-05-03 23:28:00 +0000, anonymous said:

You need to turn T into a parameter, so that StaticFilter can set it. (And it's really a string again, so I'm renaming to s.)

----
template startsNotWithp(string s)
{
     enum startsNotWithp = startsNotWith!(s, 'p');
}
/* Shorthand syntax: enum startsNotWithp(string s) = startsNotWith!(s, 'p'); */
----

alias rules = StaticFilter!(startsNotWithp, org_rules);

Hi, I have one more questions: Is it possible to write something like this?

alias rules = StaticFilter!(startsNotWith(?, 'p'), org_rules);

The ? should be used for every memember of org_rules.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to