What c++ version is vex code pro on?

So I wanted to use std::clamp :clamp: but it doesn’t seem to exist for me. So is the c++ version of vex code not have this or am I just bad at coding. plz help

As far as I know, Vexcode uses C++17, but it might be C++11. What I know for sure is that VexCode uses a real industry C++ compiler known as Clang, so all features should exist.

Do you have a #include <algorithm> line in your code?

EDIT: As Jpearman said below, it is C++11, which does not have std::clamp

1 Like

I have #include <algorithm>

It’s not really a VEXcode issue, but we are primarily on C++11. The sdk that VEXCode uses has a certain amount of the C++ standard library included in vexos, and that work was done quite some time ago. VEXcode is using clang 8, so it’s technically possible to modify the makefiles and link against a more recent version of the standard library, but you will end up with considerably larger program executables and it’s not something we ever test for.

10 Likes