Skip to content

F.16 ("in" parameters): Move Matrix example to F.20 (return values)#1922

Merged
hsutter merged 1 commit intoisocpp:masterfrom
N-Dekker:F.16-Remove-Matrix-example
Jun 13, 2022
Merged

F.16 ("in" parameters): Move Matrix example to F.20 (return values)#1922
hsutter merged 1 commit intoisocpp:masterfrom
N-Dekker:F.16-Remove-Matrix-example

Conversation

@N-Dekker
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker commented Jun 4, 2022

Moved the Matrix example and the notes about assignment from rule F.16 (For "in" parameters, pass cheaply-copied types by value...) to rule F.20 (For "out" output values, prefer return values...).

With help from Sergey Zubkov (@cubbimew).

Credits: My LKEB colleague Denis P. Shamonin (@dpshamonin) originally mentioned to me that the example appears off-topic, in the context of rule F.16.

@cubbimew
Copy link
Copy Markdown
Member

cubbimew commented Jun 6, 2022

technically it is showing pass by reference to const, though content-wise it is really an example for F.20 (return by value).
I'd move it there, just before the counter-example with Package

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.
@N-Dekker N-Dekker force-pushed the F.16-Remove-Matrix-example branch from 45b0cf9 to d1a9e79 Compare June 6, 2022 10:55
@N-Dekker
Copy link
Copy Markdown
Contributor Author

N-Dekker commented Jun 6, 2022

technically it is showing pass by reference to const, though content-wise it is really an example for F.20 (return by value).
I'd move it there, just before the counter-example with Package

@cubbimew Thanks again for your comment! Please check the force-push I just did!

@N-Dekker N-Dekker changed the title F.16 ("in" parameters): Remove Matrix example and notes on assignment F.16 ("in" parameters): Move Matrix example to F.20 (return values) Jun 7, 2022
@hsutter hsutter merged commit a534f4a into isocpp:master Jun 13, 2022
@hsutter
Copy link
Copy Markdown
Contributor

hsutter commented Jun 13, 2022

Editors call: Great, thanks!

bgloyer added a commit to bgloyer/CppCoreGuidelines that referenced this pull request Jun 16, 2022
* F.16 ("in" parameters): Move Matrix example to F.20 (return values) (isocpp#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 (isocpp#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 isocpp#1921

* Fix GitHub Actions build warnings, Marker style should be `*` (isocpp#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>
bgloyer added a commit to bgloyer/CppCoreGuidelines that referenced this pull request Jul 9, 2022
* F.16 ("in" parameters): Move Matrix example to F.20 (return values) (isocpp#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 (isocpp#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 isocpp#1921

* Fix GitHub Actions build warnings, Marker style should be `*` (isocpp#1925)

* C.166: Use markdown format and document title for link (isocpp#1929)

* C.9: Improve an inline link (isocpp#1933)

Avoid ending the sentence with a dangling "see".

Co-authored-by: Niels Dekker <N.Dekker@lumc.nl>
Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
Co-authored-by: Francisco Moretti <franciscoemoretti@gmail.com>
Co-authored-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
bgloyer added a commit to bgloyer/CppCoreGuidelines that referenced this pull request Jul 9, 2022
* 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) (isocpp#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 (isocpp#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 isocpp#1921

* Fix GitHub Actions build warnings, Marker style should be `*` (isocpp#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>
bgloyer added a commit to bgloyer/CppCoreGuidelines that referenced this pull request Jul 9, 2022
* F.16 ("in" parameters): Move Matrix example to F.20 (return values) (isocpp#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 (isocpp#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 isocpp#1921

* Fix GitHub Actions build warnings, Marker style should be `*` (isocpp#1925)

* C.166: Use markdown format and document title for link (isocpp#1929)

* C.9: Improve an inline link (isocpp#1933)

Avoid ending the sentence with a dangling "see".

* C 32 (#5)

* 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) (isocpp#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 (isocpp#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 isocpp#1921

* Fix GitHub Actions build warnings, Marker style should be `*` (isocpp#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>

Co-authored-by: Niels Dekker <N.Dekker@lumc.nl>
Co-authored-by: Herb Sutter <herb.sutter@gmail.com>
Co-authored-by: Francisco Moretti <franciscoemoretti@gmail.com>
Co-authored-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
hsutter added a commit that referenced this pull request Jul 13, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants