I opened this same project in Atom and it did not show the same errors. I then generated the project file for CLion, opened it and it does show the error again.
Perhaps this is a path issue when generating the project files.
In which headers would I expected std::unique_ptr to be defined for this configuration? How do the project file paths differ than the command line pio run builds?
It looks like the build happens with toolchain-xtensa. The PlatformIO IDE uses clang for code completion. I found that the memory header in the xtensa toolchain includes bits/unique_ptr.h for the implementation. In that header I see _GLIBXX pragmas (such as _GLIBCXX_VISIBILITY(default)).
Could it be that these headers work with xtensa-lx106-elf-g++ but not Clang?
HI, the same happened to me, after the last update of vscode or platformio, I dont know which one because being honest I didnt read the message, it stoped recognizing std::bind, std::unique_ptr or the type WiFiEventHandler which I am guessing is from ESP8266WiFi.h, but the trick is in the c_cpp_properties.json file, modify the define __cplusplus and set it to 201103L being the result “__cplusplus=201103L” so it will use the c++11 standard, that worked for me and holefully for you too.
Thanks for opening the bug. You are right, when re opening the project the value gets rewritten and the annoying problem returns, I hope it gets fixed soon.