[gdal-dev] C4251 warnings in VS2017
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).
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).
Mateusz Loskot, http://mateusz.loskot.net
More information about the gdal-dev