RValue reference support

Milian Wolff mail at milianw.de
Thu Jun 2 17:38:21 UTC 2011


David Nolden, 02.06.2011:
> Yes, I fear you will have to modify both. You will also have to make
> sure that they translate properly into each other, and are printed
> correctly (see Cpp::shortenedTypeIdentifier(..), this will need a few
> unit tests).
> 
> In general, since rvalue-references are nearly like normal references,
> the best thing would be to just add an additional flag "isRValue" to
> ReferenceType and TypeIdentifier, and only do rvalue-reference special
> treatment if "isRValue && isReference". It's most important that
> isReference is always true for rvalue-references, so the majority of
> code will simply keep working.

Ok, will do. 

Though I have a question. How am I supposed to extend e.g. 
IndexedTypeIdentifier::hash when I add a new member? The hash needs to be 
unique, so much I gather - but these numbers in there are looking totally 
random to me. Should I just generate another random number and multiply that 
with m_isRValue ?

> To make it perfect, you would also have to modify the
> overload-resolution (the information whether something is an lvalue or
> rvalue is already there, although probably not precise, see
> OverloadResolver::Parameter::lValue), however I'm not sure if this is
> worthwhile, maybe leave this point for later.

I'll take a look but probably I'll defer it to later.

bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110602/9bb03230/attachment.sig>


More information about the KDevelop-devel mailing list