[gdal-dev] C4251 warnings in VS2017

Mateusz Loskot mateusz at loskot.net
Tue Jun 11 07:37:46 PDT 2019

On Tue, 11 Jun 2019 at 16:20, Michel Dastous <Michel.Dastous at bentley.com> wrote:
> Im asking because ticket #4099 was closed saying it should no longer be an issue with MSVC2015, so I was expecting it to be fixed in VS2017.

Right, I missed that one.

Chances are some recent tweaks, even the empty initializer list, triggered
that again for the member. Just ignore it (even with #pragma
in your code).

[1] """
I recommend avoiding this in the first place - putting STL types in
your DLL's interface
forces you to play by the STL's rules (specifically, you can't mix
different major versions
of VC, and your IDL settings must match).
However, there is a workaround. C4251 is essentially noise and can be

Stephan T. Lavavej (one of the maintainer's of Micrsoft's C++ library).

[1] https://web.archive.org/web/20130317015847/http://connect.microsoft.com/VisualStudio/feedback/details/696593/vc-10-vs-2010-basic-string-exports

Best regards,
Mateusz Loskot, http://mateusz.loskot.net

More information about the gdal-dev mailing list