Firstly, the conversion sequence of all three is the same, except that for the first two there is an lvalue conversion (conversion of lvalue to rvalue), which, however, is not used to order the conversion sequences. All three are exact matches (the specification of the function template has the parameter type char const(&)[2] ).
If you 13.3.3.2p3 over the rules in 13.3.3.2p3 , you stop at this paragraph
S1 and S2 are binding bindings (8.5.3), and none of them refers to an implicit parameter of a non-static member function object declared without a ref-determinant, and S1 binds an rvalue link to an rvalue, and S2 binds an lvalue value to a link.
The conversion sequence cannot be formed if you want to bind the rvalue reference to the lvalue, the specification says in 13.3.3.1.4p3. If you look at how binding binding works on the last 8.5.3p5 pool, it will create a temporary (I think they mean temporary rvalue) type char const* from the lvalue array and bind the link to this temporary. Therefore, I think (1) better than (2) . The same applies to (1) to (3) , although we do not need this because (3) is a template, so in the tie we select (1) again.
At n3225 they changed the link binding rules so that rvalue links can bind to initializer expressions that are lvalues, as long as the link is bound to rvalue (possibly created by correctly initializing the transform earlier). This may affect Visual C ++ processing, which may not be relevant here.
I'm not sure about clang. Even if he ignores (1) , then he will fall between (2) and (3) , and he will need to select (2) , because this is not a template.
I think the last 8.5.3p5 bullet is confused because it says "Otherwise, the temporary type ..". It is unclear whether the temporary value refers as an lvalue or as an rvalue to 13.3.3.1.4p3, which means that I am not sure how the following should behave according to the exact words spec
void f(int &); void f(int &&); int main() { int n = 0; f(n); }
If we assume that the temporal relation is regarded as an rvalue according to Proposition 13, then we bind the rvalue ref to the rvalue in the second function and the lvalue in the first. Therefore, we will choose the second function, and then we will get the diagnosis using the last pool 8.5.3p5, because T1 and T2 are associated with the binding. If we assume that the temporary relationship is treated as an lvalue in accordance with paragraph 13, then the following will not work
void f(int &&); int main() { f(0); }
Because we bind the rvalue ref to the lvalue, which in accordance with clause 13 will make the function non-viable. And if we interpret “binding rvalue ref with lvalue” to refer to an initializer expression instead of the final expression associated with it, we will not accept the following
void f(float &&); int main() { int n = 0; f(n); }
This, however, is valid with n3225. So there seems to be some kind of confusion - I sent DR to the committee about this.