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: ACKfaede747b3
jonasschnelli: ACKfaede747b3
Tree-SHA512: be12c23287398e4525f16e13de30e51a42d9e38284644eed5b67fa23197b09436d75a3aa8db08555ee91a38a0f159d2722b8a9927ce0bc906e600d2a7976086b
This commit is contained in:
commit
277abed604
1 changed files with 8 additions and 0 deletions
|
@ -478,6 +478,14 @@ Wallet
|
||||||
General C++
|
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
|
- Assertions should not have side-effects
|
||||||
|
|
||||||
- *Rationale*: Even though the source code is set to refuse to compile
|
- *Rationale*: Even though the source code is set to refuse to compile
|
||||||
|
|
Loading…
Reference in a new issue