Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rationale behind reuse of "&&"-token for rvalue reference?

I recently held a presentation on C++11, mainly focusing on rvalues and move semantics. During the presentation the question came up on why the standard committee decided to reuse the "&&"-token instead of introducing a new one like "§".

Has anyone came across the rationale for reusing &&?

like image 327
MFH Avatar asked Jun 25 '12 09:06

MFH


People also ask

What is rationale for recycling?

Recycling reduces the need for extracting (mining, quarrying and logging), refining and processing raw materials all of which create substantial air and water pollution. As recycling saves energy it also reduces greenhouse gas emissions, which helps to tackle climate change.

What is the importance of reuse?

Reducing, reusing and recycling waste helps save landfill space by keeping useful materials out. The amount of energy and natural resources needed to produce or collect the raw materials and manufacture the product are reduced.

Why is it important to reuse the waste material?

Q: What are the environmental benefits of recycling? A: It conserves energy, reduces air and water pollution, reduces greenhouse gases, and conserves natural resources. Stanford recycled, composted, and otherwise source reduced 62% of its waste and reduced landfill by 35%.

How do you explain reuse?

Reusing is the act of taking old items that you might consider throwing away and finding a new use for them. Get the most mileage out of the materials you encounter. Jars from grocery store foods can be used to store leftovers or to take lunch to work. Use old clothing as cleaning rags.


1 Answers

The committee wanted a token that is on a US keyboard. We also needed something that would not break existing code. && seemed like an obvious token to use. We were also looking for minimal changes to the standard and the idea of reusing a token instead of inventing a new one was attractive.

I credit John Spicer (EDG) with first suggesting && as the token at the April 2002 meeting in Curaçao.

like image 57
Howard Hinnant Avatar answered Sep 18 '22 05:09

Howard Hinnant