On Wed, Nov 12, 2025 at 10:47 AM 'Emilio Cobos Álvarez' via [email protected] <[email protected]> wrote:
> Hi, > > As of bug 176811 <https://bugzil.la/176811>, we now use C++20 for all our > C++ code. > > That means you should be able to do things like initializing your > bitfields inline now, along with a lot of other language features > <https://en.cppreference.com/w/cpp/20.html> :) > > There are probably also some follow-up opportunities: > > - I think some of the `FMT_STRING` clunkiness could be cleaned up. > - MOZ_LIKELY / MOZ_UNLIKELY could be moved to the standard > `[[likely]]` and `[[unlikely]]` macros. > - Tons of constexpr stuff could be improved. > - Maybe std::span could be used instead of mozilla::Span. > > Keep in mind that std::span currently does not do bounds checking while mozilla:Span does, so you are potentially introducing security problems if you make this substitution. (If you'd like to help change that, please take a look at some of the bugs blocking bug 1986488!) Andrew > And probably tons of others I'm missing. > > Anyways, this took a surprising amount of work, see the bug for details. > Chris Peterson did most of it (thanks!), I just pushed it over the finish > line. Thanks to everyone else who helped too (and to Mike for all the > reviews as usual :P). > > Cheers, > -- Emilio > > -- > You received this message because you are subscribed to the Google Groups " > [email protected]" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAFhp-qfYGNhpAJ%2B%2BOfgvxszKp7B_fZkQQv9suOOUxwKGcLUViA%40mail.gmail.com > <https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAFhp-qfYGNhpAJ%2B%2BOfgvxszKp7B_fZkQQv9suOOUxwKGcLUViA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "[email protected]" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAG3OmdPB%3DDMmEquwinvbFKCTfoHqWVBCsV%2BHwNDH9P0%2BueiGNw%40mail.gmail.com.
