How do I check during compilation that GCC (or any other compiler) has at least C++17 running? Can you give a minimal preprocessor snippet that emits an error if the version is below C++17?
I presume this can be built from __cplusplus
and the #error
directive.