I’ve seen mixed message in various posts about how to enable this. But the best i can do it have it enable c++2017. (according to __cplusplus
) I was trying to enable 20 for support of default struct equality comparisons.
The output looks like:
src/main.cpp:5:63: note: '#pragma message: C++ standard version: 201703L'
5 | #pragma message "C++ standard version: " STRINGIFY(__cplusplus)
|
^
src/main.cpp:3:30: note: in definition of macro 'STRINGIFY_HELPER'
3 | #define STRINGIFY_HELPER(x) #x
| ^
src/main.cpp:5:42: note: in expansion of macro 'STRINGIFY'
5 | #pragma message "C++ standard version: " STRINGIFY(__cplusplus)
| ^~~~~~~~~
src/main.cpp:13:8: error: defaulted 'bool Derp::operator==(const Derp&) const' only available with '-std=c++20' or '-std=gnu++20'
13 | bool operator== (const Derp& other) const = default;
| ^~~~~~~~
*** [.pio\build\esp32-s3-devkitm-1\src\main.cpp.o] Error 1