Logo

Blog


C++ Insights news flash - Clang 13 and more

It's been a while since I last wrote about C++ Insights. Sorry for that. No worries, I still actively maintain the project.

Switch on C++23

Last week I took two days to push C++ Insights a bit forward. It now uses Clang 13! With that change I moved the C++20 switch from -std=c++2a to -std=c++20. In addition there is now a new option -std=c++2b for early C++23 support.

Under the hood, I refactored several things. Among that is start using C++20 features like Concepts :-) Sadly ranges are not in the shape I need them, nor std::format, but it looks like they both will be with Clang 14.

The default standard for the web frontend is now C++20.

Windows with Visual Studio 2022

For the Windows build, I switched the GitHub action to Windows Server 2022 (I think that's what they call it). With this switch came Visual Studio 2022. A good improvement, as a lot of the error messages from Clang headers, are now gone! Thanks to some people on Twitter, I managed to get rid of other compiler warnings.

Fixing structured bindings n of m

Structured bindings have been a recurring source of errors. I didn't count how often I've tried to fix them so far. I hope I'm now pretty close to correct. Fixing #425 gave me some more insights after studying the wording in the standard for multiple hours and checking the implementation of Clang. I still might be wrong due to a misunderstanding or misinterpretation. If you know more than me, please let me know.

Reducing the number of open issues

I also managed to reduce the number of open issues a bit. One example was #425 above. Some are still open as I need more time to investigate them.

New transformation

I added a new transformation which shows the compiler injected return 0 in main if we fall off the control flow without saying return ourselves. The upcoming February episode of C++ Insights YouTube will show the transformation in more detail.

Support the project

You can support the project by becoming a Patreon or, of course, contributing with code.

Andreas