https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92662

--- Comment #4 from Michael Matz <matz at gcc dot gnu.org> ---
Even though bugzilla isn't really for educating people, I'd still like to ask
why the two conversion sequences are deemed either incomparable or equal.  In

  S b { moveme(t) };

the return value of moveme() has type Test&&.  There exists a conversion
operator exactly matching that type, and giving S&&, which can be used for
initialization.  Why is the sequence going via 'const S &' as good as that one,
even though it requires a change in refness?

(In a way it's simply irritating that, despite the same signatures of all
involved functions, the compiler differs between both cases, in particular the
call to str() in 'S a {moveme(t).str()}' also gives type S&&).

Reply via email to