<p>I am <strong>NOT</strong> asking what &amp;&amp; means.</p>
<p>Does anyone know the history of why the symbol &amp;&amp; was chosen? I can give some guesses, but wondering about the actual history. I know lot's of stuff is discussed through the mailing list. However I'm having trouble finding the history on this. Seems like discussions started in 2006.</p>
<p>All I've found is from <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1377.htm#What%20is%20needed%20from%20the%20language?" rel="noreferrer">here</a>:</p>
<blockquote>
<p>The '&amp;&amp;' is the token which identifies the reference as an &quot;rvalue reference&quot; (bindable to an rvalue) and distinguishes it from our current reference syntax.
But this does not explain the reasoning behind the symbol choice.</p>
</blockquote>
<p>Note I already asked this <a href="https://softwareengineering.stackexchange.com/questions/455370/why-was-chosen-as-rvalue-reference-in-c">here</a>, but looks like it was the wrong site.</p>

<c++><history>
Why was && chosen as rvalue reference in C++?
CC BY-SA 4.0
2024-10-16T16:55:19.180Z
Probably because `&` prefix is already associated with references, and `&&` was not otherwised used in this context (its other meaning is logical AND, which can't be used in declarations).
Barmar
CC BY-SA 4.0
2024-10-16T21:52:48.100Z
@Barmar Binary `&&` can appear in array sizes and template parameters. Still, unary `&&` doesn't introduce any issues that `*` and `&` didn't.
benrg
CC BY-SA 4.0
2024-11-07T16:22:57.547Z
if you were the designer, what would you have chosen instead?
CoffeeTableEspresso
# Why was && chosen as rvalue reference in C++?
Posted by: username_0 on 2024-10-16
I am **NOT** asking what && means.

Does anyone know the history of why the symbol && was chosen? I can give some guesses, but wondering about the actual history. I know lot's of stuff is discussed through the mailing list. However I'm having trouble finding the history on this. Seems like discussions started in 2006.

All I've found is from [here](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1377.htm#What%20is%20needed%20from%20the%20language?):

> The '&&' is the token which identifies the reference as an "rvalue reference" (bindable to an rvalue) and distinguishes it from our current reference syntax.
> But this does not explain the reasoning behind the symbol choice.

Note I already asked this [here](https://softwareengineering.stackexchange.com/questions/455370/why-was-chosen-as-rvalue-reference-in-c), but looks like it was the wrong site.
**Tags:** c++ history
> **Comments:**
> **username_1**: Probably because `&` prefix is already associated with references, and `&&` was not otherwised used in this context (its other meaning is logical AND, which can't be used in declarations).  
> **username_2**: @Barmar Binary `&&` can appear in array sizes and template parameters. Still, unary `&&` doesn't introduce any issues that `*` and `&` didn't.  
> **username_3**: if you were the designer, what would you have chosen instead?  
---
## 0 answers
