C++17 across our code base

20 views
Skip to first unread message

Avi Drissman

unread,
Jan 26, 2022, 2:25:24 PMJan 26
to cxx
I'm doing a quick cleanup of void casts, and one of my CLs, that was a switch to [[maybe_unused]], failed. The Linux bots complain about the brackets and the other bots complain that "maybe_unused" isn't a known attribute.

This is changing some ppapi/ files and the failure is in the NaCl toolchain.

I thought were were C++17 across our code base. Is this expected, or should I file a bug?

Avi

Daniel Cheng

unread,
Jan 26, 2022, 2:33:40 PMJan 26
to Avi Drissman, cxx
There are multiple NaCl toolchains. C++17 should be supported for any NaCl toolchain that needs to build Chromium code that's also built with the rest of Chrome. ppapi/cpp is not one of them though: the DEPS files specifically tries to block out dependencies on the rest of Chrome: https://source.chromium.org/chromium/chromium/src/+/main:ppapi/cpp/DEPS

More generally, while it's true that some uses of (void) may be better suited for [[maybe_unused]], I looked at the bug and it seems to cover a blanket migration of all uses of (void). I do not think we should do that since both (void) and std::ignore are allowed AFAIK.

Daniel

--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACWgwAat-EPkqrZOOF7tTVjHym%3DR-mp%2BvxspCNXC%2Bz9zYOQzoA%40mail.gmail.com.

Nico Weber

unread,
Jan 26, 2022, 6:17:07 PMJan 26
to Daniel Cheng, Avi Drissman, cxx
What Daniel said: virtually all code is built with c++17, but some nacl test files (that all don't depend on "real" code) aren't.

Reply all
Reply to author
Forward
0 new messages