Date
2010-08-03.00:00:00
Message id
2814

Content

N3092 comment US 77

The following example is ambiguous:

    template<typename T> int f(T&);
    template<typename T> int f(T&&);
    int i;
    int j = f(i);

Because of the special deduction rule for lvalues passed to rvalue-reference parameters, deduction produces f(int&) for both templates, and they are indistinguishable.

Because f(T&) accepts a strict subset of the things that f(T&&) does, it should be considered more specialized by the partial ordering rules.