
Mat wrote:
"Peter Dimov" <pdimov@pdimov.com> writes:
Mat Marcus wrote:
Also, you might consider adding:
#define _SECURE_SCL 0
for VC 9.
And make the users chase subtle ODR violations? Not very polite.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=863481&SiteID=1
Ouch, good point. I guess one has to consider _SECURE_SCL=0 as a global setting. Perhaps the boost build system might want to make this the default, given the past performance issues of MS checked iterators, etc. even in release builds. (I haven't measured the performance imapct for vc9 yet, but I did notice that it is not a debug-only switch).
- Mat
In additions to John Maddock's concerns about whether disabling the macro would even work in practice, I think it would be (kind of) rude to even try. Suppose somebody actually wants to deprecate code and warning 4995 is disabled? Or supposed somebody actually wants to use these "checked iterators", or does not want to use boost functions that access this code. I think boost should respect these deprecations as a valid way for the user to configure things, boost headers should not muck with them. I think it is kind of rude that the vendor's stl deprecates standard function *by default*, but in order to preserve the *option* to deprecate them I think boost should just let it be. In the boost build files they should be defined, as John Maddock said. In user code those of us who choose msvc should just deal. (I put them at the top of the precompiled header in vc8) -- John Femiani