On Tuesday, 12 March 2013 at 07:10:36 UTC, Andrej Mitrovic wrote:
On 3/12/13, deadalnix <deadal...@gmail.com> wrote:
Concepts are for instance THE perfect match for all kind of
range
we have.
I don't know about that. Consider that with template parameters
and
static if you can pick and choose which range type you will
implement:
struct Range(Store)
{
static if (hasLength!Store)
{
// implement length, make the range random-access
}
else
{
// make the range an input range
}
}
How would you implement this with concepts if you have to put
the list
of implements at the struct header?
I was thinking about constraint. I don't think static if should
go away in any way.