On 08/03/2013 12:06 AM, Andrej Mitrovic wrote:
On 8/2/13, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:
auto fun(auto x, auto y) { … }

Truth be told, at the time of that decision
parameter names (viz. x and y) could not be used in template
constraints. Now they could, so in a way that reopens the question.

You'd still have to use typeof(x) and typeof(y) to extract the types,
so even though you end up making the template declaration simpler you
also make the constraint more complicated.
...

bool compare(a,b) if(__traits(compiles,a<b)) { return a<b; }

Reply via email to