Does OF not work with C++17?

Hi, I just tried to compile OF using C++17 and it failed.

Using C++14 worked fine.

Is it simply not compatible with C++17 yet?

What are the steps to try C++17?

Tried recently to compile current master with MSYS2 setting c++17 option.
Just had a few conflicts on new ‘byte’ type defined in std:: (especially in Systemutils.cpp).
I just had to remove the ‘using namespace std’ and modify all lines with string to std::string.
My goal was to try to enable std::fs and remove boost dependency.

Did you achieve your goal?

How exactly do you enable the c++17 setting?

I’ve managed to compile OF with C++17 and to compile and run the tests.
However, some of the tests on the file system where failing and when I’ve tried to find the root cause, I’ve found out that ofToDataPath() may have some flaws. As it is very deep inside OF code, I’ve not gone further yet.

How I’ve done it ? Simple, I’ve just switched from gnu14++ to c++17 in openframeworks/libs/openFrameworksCompiled/project/msys2/config.msys2.default.mk.
You may look at my branch in Github that has it and other enhancement.

2 Likes