A close reading of a Chromium commit by Peter Kasting that added a converting constructor from initializer_list to base::span, mirroring the C++26 P2447 proposal. The post walks through real call sites in the codebase that were simplified by the new constructor, showing how three different workarounds (temporary std::array, doubled curly braces, explicit span cast) all converged on cleaner natural syntax. Two 'failure cases' are also examined where the change couldn't fully simplify code due to the lack of CTAD and C++ grammar restrictions on braced initializer lists after operators.
Sort: