Currently these guidelines conflict with R.34, R.35, and R.36.
This conflict has led to confusion, where it's unclear which
guidelines to prefer for `shared_ptr` types.
In a [previous
PR](https://github.com/isocpp/CppCoreGuidelines/pull/1989) I proposed
preferring the "F" series of guidelines. This PR takes the opposite
approach and prefers the "R" guidelines for `shared_ptr` types.
I don't feel strongly about which guidelines to prefer, I just want to make
sure the guidelines are internally consistent.
The enforcement rule on "an object is allocated and then deallocated on all paths" is not _specifically_ about objects declared by the `auto` keyword, and `auto` does not just mean "automatic storage duration" anymore.
Avoided a potential misunderstanding that `throw e` would slice *any* `e` to `std::exception`.
The note about rethrowing appears to be written when the example of this item still did `catch (const exception& e)`, which was prior to commit d568d190f6, "Generalized E.15, closes#1848".
Fixes#1946:
- copy_trait type argument needs to be a container element type.
Use Value_type<Iter> like in other examples.
- Fix name typo in the definition of copy_helper.
* Update CppCoreGuidelines.md
* Update CppCoreGuidelines.md
* Update isocpp.dic
* use snake casing
* sake case naming
* C 32 comments (#3)
* F.16 ("in" parameters): Move Matrix example to F.20 (return values) (#1922)
The `Matrix` example and the notes about assignment appear off-topic in rule F.16, as F.16 is specifically about "in" parameters.
With help from Sergey Zubkov.
* SL.io.50 (Avoid `endl`): Mention string streams (#1920)
Explicitly mentioned string streams as `endl` insertions into string streams do actually occur in the wild.
With help from Sergey Zubkov.
* Extended E.16 to include copy ctor for exception type, closes#1921
* Fix GitHub Actions build warnings, Marker style should be `*` (#1925)
* restored reference
* Added references to note
Co-authored-by: Niels Dekker <N.Dekker@lumc.nl>
Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
Co-authored-by: Niels Dekker <N.Dekker@lumc.nl>
Co-authored-by: Herb Sutter <herb.sutter@gmail.com>