The information in this thread is outdated, please see ESP32 C++17 toolchain missing std::optional - #7 by maxgerhardt.