what version of c++ are allowed for lib builds?

I know the generic make uses c++11. I think surge is using c++17? what are the limits on what you can use, and are there any issues? I don’t really needs the new features, but it’s a drag that I’m using the MS compiler for my unit tests, and that compiler won’t go all the way down to 11…

1 Like

17 is supported

2 Likes

I just did a 20 build in the toolchain and it worked.

The defacto answer is: it has to compile in the toolchain for all platforms including macos 10.9. Since macOS has some cpp in the libc you don’t quite get all of 17 or 20 but you get most of it.

All my plugins are 17 in prod now. I think surge family will start the 20 transition this year and I will no longer have to enable-if :slight_smile:

3 Likes

Nice. Are there any C++20 features known not to work on any platforms using the toolchain?

Apple has a clear doc about what comes from libc vs headers. C++ Language Support - Xcode - Apple Developer

I tested <=> and it worked

I’m not moving quite yet but I am thinking of starting to very soon, but will move the vst and core libs first - rack plugins will come later.

1 Like

I peeked through the binaries in the toolchain and it looks like it is

gcc 13 for windows and linux and Apple clang 15 ? for mac

This table should help us further with the details: https://en.cppreference.com/w/cpp/compiler_support/20

Yes but libc impact matters also

For instance the targeted libc doesn’t include std filesystem so rack uses ghc (which most other folks do too). And some parts of the language come from libc like outlined in the doc above.

The toolchain is a definitive test for this but if you use 20 you will need to test there