Chromium’s span-over-initializer-list success story
span-over-initializer-list success storyPreviously: “span should have a converting constructor from initializer_list”
(2021-10-03). This converting constructor was added by P2447
for C++26. Way back in 2024, Peter Kasting added the same constructor to Chromium’s
base::span —
he emailed me about it at the time — but I was only recently reminded that in
the /r/cpp thread
about the feature he’d written:
Yup, this change was so useful it led to me doing a ton of reworking of Chromium’s
base::spanjust so I could implement it there.
Speaking of ambiguity: out of context that comment could be taken as sarcasm. What programmer enjoys “doing a ton of reworking just” to implement a single new constructor? Did he mean the change was so useful, or, like, “so useful”? :) So it’s worthwhile to track down pkasting’s actual commit from November 2024 and see all the places he sincerely did clean up as a result.

