[unordered] Compiler warnings in VC++ 9 SP1

I just replaced a std::map with a boost::unordered_map and got many compiler warnings (not only me as it seems like: http://www.boost.org/development/tests/release/developer/output/RW_WinXP_VC7...). Is anyone working already on the code to get rid of the warnings? Boris

On 21/08/2008, Boris <boriss@web.de> wrote:
I just replaced a std::map with a boost::unordered_map and got many compiler warnings (not only me as it seems like: http://www.boost.org/development/tests/release/developer/output/RW_WinXP_VC7...). Is anyone working already on the code to get rid of the warnings?
No, I'll do something about the inline warning. I don't know what to do for the warnings about std::equal being unsafe. Can I just disable the warning with pragmas? Daniel

Hi Daniel ! An'n Donnerstag 21 August 2008 hett Daniel James schreven:
No, I'll do something about the inline warning. I don't know what to do for the warnings about std::equal being unsafe. Can I just disable the warning with pragmas?
The compiler says: "To disable this warning, use -D_SCL_SECURE_NO_WARNINGS." Should be easy enough. For more information, grep the mailing list archive or the Jamfiles for "SCL_SECURE" Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

Jürgen Hunold wrote:
Hi Daniel !
An'n Donnerstag 21 August 2008 hett Daniel James schreven:
No, I'll do something about the inline warning. I don't know what to do for the warnings about std::equal being unsafe. Can I just disable the warning with pragmas?
The compiler says: "To disable this warning, use -D_SCL_SECURE_NO_WARNINGS."
Should be easy enough. For more information, grep the mailing list archive or the Jamfiles for "SCL_SECURE"
No you don't want to do that: the macro has to be set on the command line before any headers are included and we can't guarentee that in general. In any case the user may *want* to see that warning in his code, just not in Boost code :-/ So pragma's are probably the only way to go (but even those are less than ideal for complex reasons). John.

Jürgen Hunold <juergen.hunold <at> ivembh.de> writes:
Hi Daniel !
An'n Donnerstag 21 August 2008 hett Daniel James schreven:
No, I'll do something about the inline warning. I don't know what to do for the warnings about std::equal being unsafe. Can I just disable the warning with pragmas?
The compiler says: "To disable this warning, use -D_SCL_SECURE_NO_WARNINGS."
Should be easy enough. For more information, grep the mailing list archive or the Jamfiles for "SCL_SECURE"
You could use pragmas on places where you are sure or use the secure version: #pragma warning( push ) #pragma warning( disable : <whatever warning number> ) <your code here> #pragma warning( pop ) regards, Markus
participants (5)
-
Boris
-
Daniel James
-
John Maddock
-
Jürgen Hunold
-
Markus Werle