Boost logo

Boost :

From: Tanguy Fautre (tanguy.fautre_at_[hidden])
Date: 2006-06-14 10:19:26


Hi,

Currently with Boost 1.33.1 and Visual C++ 2005, the libraries are
compiled with the default _SECURE_SCL=1 value, which means Boost *.lib
and *.dll files are compiled with checked iterator enabled.

When an application using Boost is compiled with _SECURE_SCL=1 too,
everything is fine.

However, all hell breaks loose when the application is compiled with
_SECURE_SCL=0 (which is the case of our projects). The problem arises
because apparently the iterator implementation and structure is different.

Therefore any call to Boost *.lib or *.dll functions with an iterator
passed as an argument will result in a weird and unexplained crash (I
first got the problem when using Boost.Signals).

Because Visual C++ 2005 checked iterators are not Standard C++
compliant, I think that it ought to be possible to disable them when
compiling Boost (e.g. using an additional bjam variable in the vc-8_0
toolset?).

I sincerely think that not having this option is a serious bug, as it
makes Boost useless for anyone using VC2005 and having performance
constraints.

In the meantime, can anyone tell me how it's possible to globally define
_SECURE_SCL=0 when compiling Boost 1.33.1?

I tried modifying boost\config\compiler\visualc.hpp, but apparently some
Windows/VisualC headers are already included before it (causing a double
definition of _SECURE_SCL).

Regards,

Tanguy


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