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

[dcl.init] Fix brace spacing inconsistencies #6382

Closed
wants to merge 2 commits into from

Conversation

Eisenwave
Copy link
Contributor

[dcl.init] involves many uses of list initialization, and the style isn't consistent. Sometimes it isn't even consistent within the same example.

This PR makes the style consistent within the same section, where the chosen style is:

  • spaces after { and before }
  • empty brace pairs formatted as {}
  • direct list initialization formatted as T var{ a, b, c };
  • copy list initialization formatted as T var = { a, b, c };

@jensmaurer
Copy link
Member

In general, the core language examples exhibit a variety of styles to highlight the fact that C++ does not impose a particular way of formatting.

Odd duplicate spaces certainly seem to be in the "typo" arena, but other formatting should be left as-is.

@Eisenwave Eisenwave closed this Jul 17, 2023
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.

None yet

2 participants