Map include on win

Hi, I have NE related issue on win:

when I
#include
and have flag -std=c++11 for platform x86_64-win32 in manifest I get an error :

/ne/src/ne.cpp

Line 9: In file included from upload/ne/src/ne.cpp:9:

In file included from /opt/platformsdk/Win32/MicrosoftVisualStudio14.0/VC/include/map:7:
In file included from /opt/platformsdk/Win32/MicrosoftVisualStudio14.0/VC/include/tuple:6:
In file included from /opt/platformsdk/Win32/MicrosoftVisualStudio14.0/VC/include/new:6:
In file included from /opt/platformsdk/Win32/MicrosoftVisualStudio14.0/VC/include/exception:7:
In file included from /opt/platformsdk/Win32/MicrosoftVisualStudio14.0/VC/include/type_traits:6:
‘auto’ return without trailing return type; deduced return types are a C++14 extension
auto _Unfancy(_Ptrty _Ptr)
^

when I change flag to -std=c++14 it compiles ok.

What does your code look like?

Reproduced it on native extension example from manual:
added line

#include <map>

into myextension.cpp, added

platforms:
    x86_64-win32:
        context:
            flags: ["-std=c++11"]

into ext.manifest and got the same error.

Not sure what’s the root cause of this. We use clang 6 on Linux to build for Windows, and we use MSVC 2015 + WinSDK 8.1+10. I’m guessing it’s might be a missing flag or something (the msvs compatibility flags aren’t very well documented). I’ll have to look deeper into this. But fortunately you have a workaround with the c++14 flag.

1 Like