Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Pick overloaded by Rvalue?
Re: Pick overloaded by Rvalue? [message #19286 is a reply to message #19285] Mon, 24 November 2008 11:59 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
bytefield wrote on Mon, 24 November 2008 04:47

So, is better for Upp and for us to stay away from C++ new standard.

luzr wrote

Unfortunately, the main disadvantage of rvalue references is that they do not compose:

struct Foo {
Vector<int> x, y;
};

- such construct would lack auto-generated pick constructor.

I think that is solved by using rvalue references + "move" constructor, that if every object implement move constructor(thought not auto-generated).



Last time I have checked, compiler never generates implicit move constructor.

Moreover:

struct Foo {
   Vector<int> x;
   int y;
};


Here U++ has natural pick copy of Foo - created by mixing 'deep' and 'pick' constructors of various members.

Well, AFAIK, authors of r-value references considered such feature "too complex and error-prone". Go figure Smile

(It is however possible that the stance has changed since then - in that case, my stance w.r.t. next C++ would completely changed Smile

Mirek

[Updated on: Mon, 24 November 2008 12:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Looking for someone to convert a ulimate++ project to Microsoft Visual C++ project
Next Topic: Fantastic work!!
Goto Forum:
  


Current Time: Sat May 11 08:28:22 CEST 2024

Total time taken to generate the page: 0.02984 seconds