Use designated initializers only in the form that is compatible with the draft C++20 standard: with initializers in the same order as the corresponding fields appear in the struct definition.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAE4dLq9F9Zt_rRZ4Cps99ntfTe7QuQkMkiMEH9aLwv0Q6c-PpA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKqo33A%2Bk0hPC%2B1BHRKoohUC0kXux0MeTwi8bxPo4QYZyg%40mail.gmail.com.
IMO we then should update http://chromium-cpp.appspot.com/ to be consistent with that decision. That site is the official reference of "can we use this C++ feature in Chromium" and as this is explicitly allowed from C++20 while all of C++17 isn't allowed, it should be noted.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACWgwAZAat4pinQA6EwczcNXf%2BqZ0i9Fp7gL5JHFBop8Jh10Tg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAH%3DwB8yfHgEYrbv%3DM76d9N0GGn6s-V6X%2Bd%2BFJewE6psVw%3Drd5g%40mail.gmail.com.
The way I view the various style documents we have:
- The Google style guide is authoritative, unless explicitly contradicted.
- The Chromium style guide is authoritative.
- chromium-cpp.appspot.com is part of the Chromium style guide.
- The dos and don'ts page is advice.
Now, the way I read the style guides here is that the Google guide isi not allowing "C++20 designators" so much as "common pre-C++20 extension designators," and adding the further restriction, "Must be compatible with future support for C++20 designators." Subtle, but doesn't contradict our local stipulation against C++17 and C++20 features.If it's confusing to a lot of people, though, I don't think a point of clarification would hurt.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACwGi-403qTLM68zFkrv_bCnFA9nTCt_TzCCZSB7Y6VaVy1MZA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAH%3DwB8ytKOffCpLbxGioK9tZMoCGrf2GgcHTU%2BbRLLZ1CnHAKw%40mail.gmail.com.