C++11 library feature rollout

80 views
Skip to first unread message

Nico Weber

unread,
Nov 11, 2015, 11:57:51 AM11/11/15
to Chromium-dev, blink-dev, Dana Jansens
Hi,

All our platforms should now understand C++11 library features.

Like with the C++11 language feature rollout [1], we don't want to allow everything at once. Also, there are open questions how language features should interact with base (see http://crbug.com/554287 for details).

We'll follow almost the same process as for language features: http://chromium-cpp.appspot.com/ lists what's currently allowed, banned, and up for discussion. You can propose a new library feature by emailing c...@chromium.org (! – this is different from last time, we don't want to generate so much email for such a large list this time), or join that list if you want to participate in discussions. Ideally, the list will arrive at some consensus and the wiki page will be updated to mention that consensus. If there's no consensus, src/styleguide/C++/OWNERS get to decide -- for divisive features, we expect the decision to be to not use the feature yet and possibly discuss it again a few months later, when we have more experience with things. http://chromium-cpp.appspot.com/ also explains this process.

For now, the only thing that's allowed is to have vectors (and other standard containers) of movable types such as scoped_ptr – vector<scoped_ptr> now works. (See also http://crbug.com/554289 for getting rid of ScopedVector.) Note that std::move() and rvalue references still aren't allowed for now.

We'll send weekly updates to chromium-dev with new things allowed for that week.

Like last time, the goal is to eventually match the google style guide, but to spread this out over time. However, since we support many more platforms our hands might be forced by that. Also, the internal google style guide allows fewer things than the official one, and we might want to match some of that, where the internal argument applies to us too.

So, if there's some C++11 library feature you'd really like to use, make a CL that uses it, check that it gets green try jobs, and propose it on c...@chromium.org :-)

Nico and Dana

Brett Wilson

unread,
Nov 11, 2015, 12:03:20 PM11/11/15
to Nico Weber, Chromium-dev, blink-dev, Dana Jansens
Link to Google Groups mailing list if you want to subscribe:
https://groups.google.com/a/chromium.org/forum/#!forum/cxx

Brett

Scott Hess

unread,
Nov 11, 2015, 12:40:50 PM11/11/15
to Brett Wilson, Nico Weber, Chromium-dev, blink-dev, Dana Jansens
ObReminder: Consider paying attention to which account you subscribe with.

-scott


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Dana Jansens

unread,
Nov 11, 2015, 3:54:12 PM11/11/15
to Nico Weber, Chromium-dev, blink-dev
On Wed, Nov 11, 2015 at 8:57 AM, Nico Weber <tha...@chromium.org> wrote:
Hi,

All our platforms should now understand C++11 library features.

Like with the C++11 language feature rollout [1], we don't want to allow everything at once. Also, there are open questions how language features should interact with base (see http://crbug.com/554287 for details).

We'll follow almost the same process as for language features: http://chromium-cpp.appspot.com/ lists what's currently allowed, banned, and up for discussion. You can propose a new library feature by emailing c...@chromium.org (! – this is different from last time, we don't want to generate so much email for such a large list this time), or join that list if you want to participate in discussions. Ideally, the list will arrive at some consensus and the wiki page will be updated to mention that consensus. If there's no consensus, src/styleguide/C++/OWNERS get to decide -- for divisive features, we expect the decision to be to not use the feature yet and possibly discuss it again a few months later, when we have more experience with things. http://chromium-cpp.appspot.com/ also explains this process.

For now, the only thing that's allowed is to have vectors (and other standard containers) of movable types such as scoped_ptr – vector<scoped_ptr> now works. (See also http://crbug.com/554289 for getting rid of ScopedVector.) Note that std::move() and rvalue references still aren't allowed for now.

Oh, additionally std::nullptr_t is allowed (so you don't have to write decltype(nullptr) anymore) in the initial version of the library styleguide, so no need to propose that. It's mentioned under the use of nullptr.
Reply all
Reply to author
Forward
0 new messages