Repository navigation
Remove designated initializers - #818
Open
cameron-craig-etas wants to merge 1 commit into
Open
cameron-craig-etas wants to merge 1 commit into
cameron-craig-etas wants to merge 1 commit into
Conversation
cameron-craig-etas
requested a deployment
to
workflow-approval
October 19, 2026 14:39 — with
GitHub Actions
Waiting
cameron-craig-etas
requested a deployment
to
workflow-approval
October 19, 2026 14:39 — with
GitHub Actions
Waiting
cameron-craig-etas
requested a deployment
to
workflow-approval
October 19, 2026 14:39 — with
GitHub Actions
Waiting
cameron-craig-etas
requested a deployment
to
workflow-approval
October 19, 2026 14:39 — with
GitHub Actions
Waiting
danth
approved these changes
Oct 19, 2026
Contributor
|
Documentation preview for this pull request is available at: |
cameron-craig-etas
marked this pull request as ready for review
October 20, 2026 09:51
cameron-craig-etas
requested review from
FScholPer,
MaciejKaszynski,
NicolasFussberger,
anmittag,
antonkri,
pawelrutkaq and
ramceb
as code owners
October 20, 2026 09:51
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#683
With the
-Wpedanticwarning set, we cannot use designated initializers, as they are not part of ISO C++.This PR removes the designated initializers.
It is a shame we cannot use designated initializers here, they look safer than the alternative, which is an ordinary initializer list. With the ordinary initializer list, we are prone to getting the parameters in the wrong order, which could cause bugs. From a quick look it doesn't look like we have many struct parameters of the same type, so we are not highly exposed to these ordering bugs.