5

When were Lvalue references introduced in C++?

A google search for this question returns for me articles with emphasis on Rvalue references. My question is about Lvalue references (a single &).

In what version of C++ were they introduced?

a06e
  • 18,594
  • 33
  • 93
  • 169
  • possible duplicate of [What are rvalues, lvalues, xvalues, glvalues, and prvalues?](http://stackoverflow.com/questions/3601602/what-are-rvalues-lvalues-xvalues-glvalues-and-prvalues) – Engineer2021 Mar 25 '14 at 19:27
  • I have always though references appeared with C++. Isn't it the case? – Florian Richoux Mar 25 '14 at 19:37
  • 1
    @staticx That question is about the semantic difference between rvalues, lvalues, etc. It doesn't ask *when* were any of these types of expressions introduced. – a06e Mar 25 '14 at 19:45

1 Answers1

7

References were present in the first edition of "The C++ Programming Language" in 1985, before the language was standardized.

But they existed since it was renamed from "C with Classes" to "C++" in 1983.

See 3.3 in http://www.stroustrup.com/hopl2.pdf.

imreal
  • 10,178
  • 2
  • 32
  • 48