If you don’t write C++ in Chromium you can stop reading.
TLDR: C++23 is now allowed. As usual, features are initially marked as “TBD” (still *disallowed*), and can be switched to “allowed” or “banned” by starting a thread with c...@chromium.org. You can check the status of each feature here. Some of them were already allowed.
Some projects are staying on C++20 for now to allow other stakeholders to catch up. They should still have C++23 bot coverage, ensuring smooth rolls into Chromium (yes, there is code that compiles with C++20 but not C++23).
Some of the cool features in C++23:
std::string::contains (substring search) and std::ranges::contains (linear-time search). Together with C++20 additions like std::map::contains, this will allow us to get rid of base::Contains.
Careful: std::ranges::contains is effectively a for-loop, so you should not use it in containers that support sublinear search, like maps and sets.
std::expected, a vocabulary type that contains an expected value or an error. Will this replace base::expected? TBD.
std::flat_set and std::flat_map, containers with set/map interfaces that store their contents in sorted vectors for performance. Will they replace their //base counterparts [1][2] ? TBD.
std::out_ptr and std::inout_ptr, smart pointers to interface with C-like APIs.
[[assume(some_condition)]] to give an optimization hint to the compiler.
Utils for tensor-like types, like multidimensional indices (v[1, 2, 3]) and std::mdspan.
Happy coding everyone,
Victor