gemini-3-flash-preview| input-price: 0.5 output-price: 3 max-context-length: 128_000 (cost: $0.02) · Anfrage: 2026-01-24T00:22:46.104071
Generated by rs-summarizer Version unbekannt
Domain: Systems Software Engineering / Language Specification & Standards Persona: Principal Software Architect and C++ Language Specialist Tone: Technical, precise, authoritative, and strictly objective.
Abstract:
This document defines the technical constraints and permitted features for C++ development within the Chromium project. It establishes a rolling support window for language standards (C++11 through C++23) and the Abseil library, prioritizing toolchain stability, binary size, and security over immediate adoption of new syntax. The guide serves as a central authority for developers to determine which modern C++ features are "allowed," "banned," or "to be determined" (TBD). It specifically emphasizes the rejection of standard features that overlap with Chromium’s //base library or introduce undesirable runtime behaviors, such as exceptions and RTTI-dependent components.
Key Technical Takeaways & Feature Status:
noexcept is permitted.std::shared_ptr and std::weak_ptr are banned due to extrinsic reference counting. Developers must use base::RefCounted or base::WeakPtr.std::bind and std::function are replaced by base::Bind and base::OnceCallback/RepeatingCallback for better lifetime and thread-safety management.<chrono> is prohibited in favor of base::Time.<=>), Designated initializers, consteval, and std::erase_if.char8_t (to avoid cast-heavy code), Modules (insufficient toolchain support), and std::span (superseded by base::span).#elifdef, std::basic_string::contains, and std::byteswap.std::expected, std::flat_map, and monadic optional operations are currently under review.//base.absl::any and absl::StatusOr (due to RTTI requirements), absl::Mutex (use base/synchronization), and absl::Random (uses non-cryptographically secure generators).Review Group: The Chromium C++ Style Arbiters & Clang Toolchain Team This group consists of senior engineers responsible for the project's technical debt, compiler performance, and the maintainability of the multi-million-line codebase. They bridge the gap between "standard C++" and "Chromium C++."
Summary from the Perspective of the Style Arbiters:
"Our primary mandate is maintaining the stability of a 35-million-line codebase where 'standard' doesn't always mean 'optimal.' Our current roadmap focuses on the cautious integration of C++20/23 while aggressively pruning features that threaten binary size or security.
<chrono>, std::function). These aren't arbitrary bans; they are necessary to prevent fragmentation. If we have a proven, thread-safe base::Callback, allowing std::function introduces risk without reward.noexcept to aid optimization but rely on explicit error handling for stability.char8_t because the 'standard' approach would force a cascade of casts across our existing string APIs. Similarly, Modules remain banned not because we dislike the feature, but because Clang and GN support are not yet performant enough for a build of our magnitude.base/, we block it to maintain a single way of doing things.std::expected can eventually replace our internal templates without a code-size penalty, we will move it from TBD to Allowed."