C++20
afritz1 opened this issue · 3 comments
Not high priority, just wanted to investigate whether it was worth upgrading to get std::span
and some other features.
Need to make sure this works in a few compilers:
- MSVC
- GCC on Debian and Raspberry Pi
- AppleClang
Probably only involves increasing the number in CMakeLists.txt
:
Line 18 in 11a6c53
Changing that line to
set(CMAKE_CXX_STANDARD 20)
seems to work with AppleClang 14 and #include <span>
at least compiles.
As long we don't use language features that are supported in some of the compilers we target but not others, it shouldn't be an issue to switch to C++20 (this chart shows features, but isn't updated for AppleClang 14).
Briefly tested in Ubuntu via WSL2. It was still GCC 9 something and didn't recognize std::span
even with -std=c++2a
, so might wait a bit more for this.