Concepts vs template constraints - the practical approach

Tobias Pankrath tobias at pankrath.net
Mon Nov 21 00:24:33 PST 2011


> Actually, that was my starting point. However, this approach does not
> scale up:
> 
> A concept typically is a collection of requirements that have to be met
> individually. A huge boolean statement inside an assertion does not give
> any clue as to which part of it failed.
> 
> The isXxx approach works fine for the template constraint itself, but to
> assert that a given type meets all requirements of a concept, it is not
> very usable at all.

Wouldn't it be preferable to improve the compiler to a degree, that it can 
tell, which subexpression of a constraint failed?


More information about the Digitalmars-d mailing list