Constraints

"İbrahim Gökhan "İbrahim Gökhan
Thu May 10 02:55:55 PDT 2012


Concepts provide us a common interface for structs, classes, 
interfaces, even arrays.
Concepts can be practically extended.
Concepts can be used for template specialization and as compile 
time constraints and as a static interface.

Also we can use concepts as traits like that:

static if (is(T : Concept)) { }

instead of

static if (satisfiesConcept!T) { }


More information about the Digitalmars-d mailing list