http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50929

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2011-10-31 07:15:48 UTC ---
Your expectations are in violation to the standard ;-). The constructor is
selected by overload resolution. The non-template constructor A(const A& a)
would be preferred, if there would be a perfect match (e.g. if you had an
lvalue of type const A), but in your example you have an lvalue of non-const A.
The "perfect-forwarding" template constructor deduces to

  template <> A(A& t)

via reference-collapsing, which is a better match for the argument expression
a.
So, this looks like an invalid issue to me.

Reply via email to