Boost logo

Boost :

Subject: Re: [boost] Boost and (Microsoft's) _SECURE_SCL
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2010-11-08 22:13:24


[John Maddock]
> I'm using import libraries - my test project is attached - no errors
> are generated even though they have hardcoded mismatched #pragma detect_mismatch's.

[Holger Grund]
> That doesn't work across PE images out of the box -- and arguably it's not
> necessarily a good idea to flag these mismatches as an error. So long as DLL
> & EXE have an interface that doesn't rely on STL constructs, there's no
> problem.

> If your interface relies on STL constructs, you could add an object file to
> the import library, make sure it's linked in by the consuming side and so
> trigger validation.

I naively expected this to work automatically, but Holger's excellent explanation reveals why it doesn't.

Our enabled-by-default validation for static linking is very obviously the correct default. This disabled-by-default validation for dynamic linking is a tougher call, but I tend to agree that it's desirable.

STL


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk