For all those who struggle with porting their existing Visual Studio 2017 projects into Visual Studio 2019, having proper project settings and pulling their hair out to no avail:
in file VC\Tools\MSVC\14.26.28801\include\filesystem
there's:
#if !_HAS_CXX17
now for why this flag is not automatically being set when changing projects settings I have no idea.
Thus I've used:
#define _HAS_CXX17 1
#include <filesystem>
in my files as a workaround. Works fine.
Update: On another system, within project's file there was
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalOptions>/std:c++14 %(AdditionalOptions)</AdditionalOptions>
The latter line was resulting in problems (obviously). Switching higher-level project settings does not remove such optional settings (obviously).