It's been allowed in Chrome C++ for some time now, so it's allowed in Blink.
In general, https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md tries to default allow features in older C++ versions, with specific callouts to things that are banned. Daniel On Tue, 12 Aug 2025 at 13:13, 'Stefano Duo' via blink-dev < blink-dev@chromium.org> wrote: > Hi blink-dev, > > Matt gave me advice to mail this list. > > We are discussing > <https://crrev.com/c/6830059/3..10/components/cronet/cronet_proxy_delegate.cc#b95> > a > C++ 17 feature: if statements with initializers > <https://abseil.io/tips/165>. It is recommended when a variable is used > within the if statement, but not outside of it. > > Pros: reduced variables scope. > Cons: new syntax, currently not common in Chromium. > > How does the community feel about this? Should its usage be allowed? > > Thank you, > Stefano > > -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to blink-dev+unsubscr...@chromium.org. > To view this discussion visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f8f46d20-0fe9-4a8d-b8a8-30d99a39a635n%40chromium.org > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f8f46d20-0fe9-4a8d-b8a8-30d99a39a635n%40chromium.org?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF3XrKoTaJNFiqSiwKjqvDDDXotXhfHaOwVHaUmwEDdsUgU4HA%40mail.gmail.com.