Weird thought. I am building a codebase. I am getting *weird* errors. Multiple o...

@mcc@mastodon.social

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.