Static Foreach + Marking "compile time" variables

Steven Schveighoffer schveiguy at yahoo.com
Wed Mar 28 17:42:45 UTC 2018


On 3/28/18 11:46 AM, Chris Katko wrote:

>      enum hasRotate = anySatisfy!( isa(pos), a);  //if of type "pos"

anySatisfy!(isa!pos, a)

anySatisfy takes a template alias (in this case, an instantiation of isa 
with a specific type), and then applies the template to all the elements 
of the alias sequence, returning true if any statisfy.

-Steve


More information about the Digitalmars-d-learn mailing list