How to use std.meta.Filter?

Dr.No jckj33 at gmail.com
Sat Apr 21 16:05:22 UTC 2018


import std.meta : Filter;
enum isNotReservedSymbol(string name) = name != "none" && name != 
"lastToken";
enum string[] members = staticMembers!Token;
static foreach(member; Filter!(isNotReservedSymbol, members))
{{
		

This return the error:

  Error: template instance `pred!(["none", "word", "n", "digits", 
"name", /* my whole array here */ ])  does not match template 
declaration isNotReservedSymbol(string name)

how should have isNotReservedSymbol be defined?


More information about the Digitalmars-d-learn mailing list