Merge #15922: doc: Explain how to pass in non-fundamental types into functions

faede747b3 doc: Explain how to pass in non-fundamental types into functions (MarcoFalke)

Pull request description:

  There is a common misconception in C++ that one ampersand is better than no ampersand and two ampersands are better than one.

ACKs for commit faede7:
  practicalswift:
    ACK faede747b3
  jonasschnelli:
    ACK faede747b3

Tree-SHA512: be12c23287398e4525f16e13de30e51a42d9e38284644eed5b67fa23197b09436d75a3aa8db08555ee91a38a0f159d2722b8a9927ce0bc906e600d2a7976086b
This commit is contained in:
MarcoFalke 2019-05-17 11:27:20 -04:00
commit 277abed604
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -478,6 +478,14 @@ Wallet
General C++
-------------
For general C++ guidelines, you may refer to the [C++ Core
Guidelines](https://isocpp.github.io/CppCoreGuidelines/).
Common misconceptions are clarified in those sections:
- Passing (non-)fundamental types in the [C++ Core
Guideline](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-conventional)
- Assertions should not have side-effects
- *Rationale*: Even though the source code is set to refuse to compile