On Tue, 14 Dec 2010 15:35:30 -0500, Patrick Down <[email protected]> wrote:

== Quote from Steven Schveighoffer ([email protected])'s article
Would it help to allow 'else' and 'else if' on the template constraints?

void foo(R)(R r) if(isRandomAccessRange!R)
{...}
else if(isInputRange!R)
{...}

This could basically be translated into two specializations like this:

void foo(R)(R r) if(isRandomAccessRange!R) {...}
void foo(R)(R r) if(isInputRange!R && !isRandomAccessRange!R) {...}

:O

Wow, that's a great idea.

Andrei?

-Steve

Reply via email to