Weird thought.
I am building a codebase. I am getting *weird* errors. Multiple of them. Errors that don't quite make sense.
I believe I am building with C++17. Some of the errors would be less strange if I were targeting some other C++ standard.
Is there some way to get my code to "leak" the C++ standard? Something like
#error __cplusplus
That doesn't work. I *can* do this
#if __cplusplus == 201703L
#error Success
#endif
This errors success! But if it hadn't, I sure would be lost.
@mcc could also be your system has a pre C++17 libstdc++, or at least the compiler is getting the -I flag for a "wrong" one before the one you need.
If you're not sure what the compiler arguments are, you should be able to give your build system a shell script that just dumps the args to the console.
Or just look at the compile_commands.json, if your build system can export them.