Open mcandre opened 2 years ago
clang 14 has been making the rounds into more and more OS distributions.
Unknown minimum gcc version (and associated OS versions) add support for all C++20 features.
Unknown minimum MSVC version for full C++20 feature support.
Maybe it's time to drop gcc and MSVC in favor of exclusively clang in our projects.
Also need to check on the status of clang-cl in Windows.
https://en.cppreference.com/w/cpp/compiler_support
[[likely]]
,[[unlikely]]
branch attributes\char8_t
contains()
method for containersPending clang 14 support in stable releases of Debian, Raspbian, and macOS (Apple Xcode clang, don't care about Homebrew clang). Unfortunately, clang 14 isn't even available in Debian sid, let alone testing or stable.
https://packages.debian.org/testing/clang
https://www.raspberryconnect.com/raspbian-packages/29-raspbian-devel
Apple Xcode clang is stuck at v 13 for now.
clang-cl supports clang 14, for what it's worth. https://community.chocolatey.org/packages/llvm
Some really advanced C++20, C++23 features require even higher versions of clang. We don't expect to interact with those anytime soon.
Don't care about gcc support. We will continue to target only the plain vanilla C++ standard wherever possible, and emphasize regular project testing with clang, as opposed to other compilers.
One option is to require all code contributors to manually install like git HEAD development, unstable version of clang when working on our C++ code. That would represent a burden. Especially for build hosts with limited resources, such as Raspberry Pi. Cross-compilation toolchains running on more expensive build hosts are nice to have, but that requires even more effort, just to get the project to build. Nope!
We'll just sit and wait until C++ 20 finally arrives, features and all, to stable-ish releases all the major OS platforms. We could go so far as Debian testing. But we like our Ubuntu at an LTS at all times, and a stable Raspbian release, and a stable Xcode release. It's arguably easier to code around missing C++ features than to code around glitches in unstable operating system distributions.