[cfe-commits] r67059 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ lib/AST/ lib/CodeGen/ lib/Sema/ test/Parser/ test/SemaCXX/

Sebastian Redl sebastian.redl at getdesigned.at
Sun Mar 22 16:31:51 PDT 2009


Douglas Gregor wrote:
>
> It looks like you haven't implemented the implicit conversion ranking
> logic for rvalue reference bindings. which would go near the end of
> Sema::CompareStandardConversionSequences. This logic should be able to
> choose appropriately between binding to "const X&" and binding to
> "X&&" for rvalues. I've checked in a commented-out, FIXME'd test case
> in rval-references.cpp that's currently not working.

Hi Doug,

Trying to implement this, but it's a mess. The distinction hinges on
three bits of information:
1) Is the bound expression an rvalue?
2) Is the binding reference rvalue or lvalue?
3) Is the conversion performed for the implicit object parameter of a
member function without a ref qualifier?

None of this information is available in the StandardConversionSequence
objects I get. I'd extend them, but I simply don't get where these
objects are filled with data. Can you help me out?

Sebastian



More information about the cfe-commits mailing list