Skip to content

Use brace initialization instead of copy initialization #101

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

Open
krishnakumarg1984 opened this issue Nov 9, 2022 · 0 comments
Open

Use brace initialization instead of copy initialization #101

krishnakumarg1984 opened this issue Nov 9, 2022 · 0 comments

Comments

@krishnakumarg1984
Copy link
Contributor

krishnakumarg1984 commented Nov 9, 2022

@mmcleod89 Let us systematically replace all uses of C-style copy initialisations with uniform brace initialisation. This is a best practice that will prevent narrowing conversions.

See this C++ core guideline here for more explanation from Stroustrup: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list

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

1 participant