Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

N-Dekker
Copy link
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
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
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
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 <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>
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 <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>
Co-authored-by: Francisco Moretti <[email protected]>
Co-authored-by: Sven van Haastregt <[email protected]>
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 <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>

Co-authored-by: Niels Dekker <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>
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 <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>

Co-authored-by: Niels Dekker <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>

Co-authored-by: Niels Dekker <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>
Co-authored-by: Francisco Moretti <[email protected]>
Co-authored-by: Sven van Haastregt <[email protected]>
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 <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>

Co-authored-by: Niels Dekker <[email protected]>
Co-authored-by: Herb Sutter <[email protected]>
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