On Friday, 31 July 2015 at 11:16:48 UTC, Biotronic wrote:
Why are there two different things in the first place?
@satisfies!(myConcept, T) should test the constraints and give
a sensible error message. This you use to indicate that type T
implements myConcept.
Why can't another template use the very same concept
information to check if a type implements the concept?
e.g.:
@satisfies!(myConcept, MyStruct)
struct MyStruct { /* ... */ }
void foo(T)(T t) if (check!(myConcept, T))
{ /* ... */ }
That would be better !