C++ Logo


Advanced search

Introducing references

From: Victor Eijkhout <eijkhout_at_[hidden]>
Date: Wed, 26 Jan 2022 15:24:06 +0000
I’m looking at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1389r0.html#delayreferences-references

And the code example there is almost literally taken from the textbook I’m writing. P1389 continues:

"Without a genuine use-case, references can make seem C++ look rather quirky! Instead, it is recommended that students be exposed to references in a practical fashion, such as when passing parameters to functions.”

I agree, which is why that code example in my book is preceded by


and followed by


Ok, so now my question to the author of that statement in P1389: please write a sample explanation of references in the context of parameter passing, without first explaining references.


Received on 2022-01-26 15:24:12