http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50034
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Keywords| |rejects-valid Last reconfirmed| |2011-08-12 CC|jason at redhat dot com |jason at gcc dot gnu.org AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 Summary|Overload selection failure |[4.7 regression] Overload |within class template |selection failure within | |class template Target Milestone|--- |4.7.0 --- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-12 04:50:06 UTC --- In this testcase, you're calling selector with an 'abstract' argument. 5.2.2/7 says, The lvalue-to-rvalue (4.1), array-to-pointer (4.2), and function-to-pointer (4.3) standard conversions are performed on the argument expression. 4.1/2 says, When an lvalue-to-rvalue conversion occurs in an unevaluated operand or a subexpression thereof (Clause 5) the value contained in the referenced object is not accessed. Otherwise, if the glvalue has a class type, the conversion copy-initializes a temporary of type T from the glvalue and the result of the conversion is a prvalue for the temporary. Hmm, having different semantics for lvalue-rvalue conversion depending on whether the expression is evaluated is surprising, but that does seem to be what the standard says. Alrighty then.