473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Re: Notation of "A Proposal to Add an Rvalue Reference to the C++ Language"

In article <9f60e411-a5b1-4571-9d3d-005432378cd4@
56g2000hsm.googlegroups.com>, ai*******@gmail.com says...
Hi,
I have been reading the improvement that will be made to C++0x, and
one of this is "A Proposal to Add an Rvalue Reference to the C++
Language" , which will add a double &, for example:

int someFunction(int && a){ ...

the reason is to allow to change temporaries passed to functions. Due
to:
That's not the real reason for rvalue references. There are two primary
reasons for rvalue references: providing move semantics, and providing
forwarding semantics.

The ability to modify the original object with impunity is the
_mechanism_ behind the move semantics. Looking at this as 'mutable',
however is looking at how you do one thing with rvalue references,
rather than looking at what the rvalue reference itself really is.

This would also completely ignore the other major use of rvalue
references, which is forwarding. In this case, the ability to modify the
original item is entirely beside the point -- it's mostly about avoiding
providing lots of overloads of forwarding functions.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jun 27 '08 #1
0 1039

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
10
by: msnews.microsoft.com | last post by:
Hi, How do I add a reference in VC++.NET? In VB.NET and VC#.NET, there's an option in "Project" menu called "Add Reference". This will add a .NET DLL reference to the current project. After I...
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
0
by: Michal | last post by:
Hi, I'm already learn cshar language. I have a little problem with serialport and error message "object reference not set to an instance of an object". Serial communication works well, but when i...
1
by: Mike | last post by:
Hi, I'm auctioning the book "The C++ Programming Language" 3rd Ed. by Bjarne Stroustrup on ebay, details as follows or see eBay item number 250030480853. Softback. Condition : Good. Pub....
8
by: kaili | last post by:
i'm chinese i heard that "The C Programming Language " by Brian W. Kernighan, Dennis Ritchie is the best book for new learners. but it is unavailable here. i mearn there is nobody selled it. i...
84
by: aarklon | last post by:
Hi all, I found an interesting article here:- http://en.wikipedia.org/wiki/Criticism_of_the_C_programming_language well what do you guys think of this article....??? Is it constructive...
0
by: Victor Bazarov | last post by:
aitorf666@gmail.com wrote: My bet is that it's not going to happen. Too late. Many compilers have already implemented the && syntax. Besides, would you allow the keyword 'mutable' to be used...
0
by: r.battistoni | last post by:
Hy to everyone I have created a simple SAX parser for a very simple XML file. When I run the code that follows I get this error: "Invalid hexadecimal character reference" The strange...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.