HeadlinesBriefing favicon HeadlinesBriefing.com

Chromium Bans Modern C++ Features

Hacker News: Front Page •
×

Chromium's official style guide now explicitly bans numerous C++11 and C++17 features, including std::shared_ptr, std::filesystem, and parallel algorithms. The project only allows new language standards after toolchain support is mature, with C++20 currently "initially supported" and C++23 slated for 2026. This policy prioritizes build stability and security over cutting-edge syntax.

The ban list targets features with poor compiler support, security risks, or performance quirks. For instance, Chromium rejects std::bind and std::function in favor of its own abstractions. Developers can propose changes by emailing [email protected], with features entering a two-year review period before a final decision. Third-party libraries can use banned features internally, but Chromium code must convert them at the interface.

This approach reflects Chromium's massive scale and long-term maintenance needs. By curating allowed features, Google ensures consistent behavior across its vast codebase and diverse platforms. Expect continued scrutiny of C++20 concepts like consteval and constraints as the project evaluates their practical impact on performance and readability.