On Sunday, 14 September 2014 at 09:42:28 UTC, deadalnix wrote:
• Specifies how things are done (implementation)
I'm not sure what this one mean precisely.

The way I interpret it is that (for template constraints), they are quite clumsy for specifying preferences between overloads, e.g.

void foo(R)(R r) if (isInputRange!R && !isRandomAccessRange!R && !isSomeString!R)
void foo(R)(R r) if (isRandomAccessRange!R && !isSomeString!R)
void foo(R)(R r) if (isSomeString!R)

Would be nice to have something like this instead:

void foo(InputRange R)(R r);
void foo(RandomAccessRange R)(R r);
void foo(SomeString R)(R r);

along with a way to specify if one "concept" is more refined than another (either explicitly or implicitly).

Reply via email to