On Friday, 28 April 2017 at 18:04:06 UTC, jmh530 wrote:
On Friday, 28 April 2017 at 17:09:22 UTC, Atila Neves wrote:
https://github.com/atilaneves/concepts
import concepts;
@models!(isForwardRange, MyType)
struct MyType { .... }
Atila
I remember you had posted about this last year. It looks like
you've added some stuff on ranges to it recently...interesting.
You might want to include an example in the Readme.md of using
the concept as a template constraint for a function. Maybe like
void callfoo(T)(T x)
if (isFoo!T)
{
x.foo();
}
Foo foo;
callfoo(foo);
Done. I also added to the README that it has its own versions of
the range constraints from Phobos that can be used with `@models`.
Atila