Skip to content
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

I.2: Avoid non-const global variables #2134

Open
jonnygrant opened this issue Sep 6, 2023 · 3 comments
Open

I.2: Avoid non-const global variables #2134

jonnygrant opened this issue Sep 6, 2023 · 3 comments

Comments

@jonnygrant
Copy link

I.2 has the following:

"Alternative: If you use global (more generally namespace scope) data to avoid copying, consider passing the data as an object by reference to const. "

I marked part in bold italic. I suggest amending it to read:

"Alternative: If you use global (more generally namespace scope) data to avoid copying, consider passing the data as a const reference to an object. "

@iglesias
Copy link
Contributor

iglesias commented Mar 9, 2024

I suggest keeping it as it is, avoiding to rewrite

'passing the data as an object by reference to const'

'passing the data as a const reference to an object'.

@coreleon
Copy link

coreleon commented Jan 30, 2025

@jonnygrant I'm a professional C++ Architect for over 23 years and I AGREE WITH YOU "a const reference to an object" !
Sorry for the rant (i did it because there are some guys that DO NOT understand what you are saying - let aside that THEY DO NOT understand a sentence and they are keen on following the shepherds) !

@jwakely
Copy link
Contributor

jwakely commented Jan 30, 2025

@coreleon insulting people isn't going to help anything.

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

No branches or pull requests

4 participants