
Cory Nelson wrote:
You should encase your header in warning pragmas:
#if defined(_MSC_VER) && _MSC_VER >= 1400 #pragma warning(push) #pragma warning(disable:4996) #endif
/* your stuff */
#if defined(_MSC_VER) && _MSC_VER >= 1400 #pragma warning(pop) #endif
I tried this--encasing the offending line in the header--and it didn't work. I was puzzled because I had searched online and found multiple sources that recommended that. However, I found this page: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac... Apparently, the warning is triggered in the line in the header file (xutility, in my case), and not in the line in my code. That means that the warning will be disabled only if I put the pragmas above before including any stdlib headers. Unfortunately, that is up to the client code, and it makes writing a header for this difficult. This will be changed in SP1, but it seems like there's little library writers can do now. This page: http://www.boost.org/tools/build/v1/vc-8_0-tools.html also recommends the client turn off that warning globally or wrap all that headers in that pragma. Looks like I have to live with this until SP1. Frederick Akalin