[format] When compiling with vc8 I get a warning
Hello, when compiling one of my projects which uses Boost.Format I get
the compiler warning shown below. I have defined both
_CRT_SECURE_NO_DEPRECATE & _CRT_NONSTDC_NO_DEPRECATE as suggested by
various web pages. With these the vast majority of warnings go away but
this pesky one attached here is still there. Would people know if there
is anything else I can do to get rid of this warning?
Thanks very much, kind regards Eoin.
Error given by vc 8.0
C:\Develop\Libraries\Boost\boost_cvs\boost/format/alt_sstream_impl.hpp(252)
: warning C4996: 'std::char_traits<char>::copy' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iosfwd(446)
: see declaration of 'std::char_traits<char>::copy'
Message: 'You have used a std:: construct that is not safe. See
documentation on how to use the Safe Standard C++ Library'
C:\Develop\Libraries\Boost\boost_cvs\boost/format/alt_sstream_impl.hpp(223)
: while compiling class template member function 'int
boost::io::basic_altstringbuf
On Tue, 15 Aug 2006 20:36:19 +0100, Eoin
Hello, when compiling one of my projects which uses Boost.Format I get the compiler warning shown below. I have defined both _CRT_SECURE_NO_DEPRECATE & _CRT_NONSTDC_NO_DEPRECATE
_SCL_SECURE_NO_DEPRECATE? :-) -- [ Gennaro Prota, C++ developer. Library designer. ] [ For Hire http://gennaro-prota.50webs.com/ ]
Hello, when compiling one of my projects which uses Boost.Format I get the compiler warning shown below. I have defined both _CRT_SECURE_NO_DEPRECATE & _CRT_NONSTDC_NO_DEPRECATE
_SCL_SECURE_NO_DEPRECATE? :-)
Yes that worked perfectly, thank you very much indeed :-) . Take care and kind regards Eoin.
On Tue, 15 Aug 2006 22:18:49 +0100, Eoin
Hello, when compiling one of my projects which uses Boost.Format I get the compiler warning shown below. I have defined both _CRT_SECURE_NO_DEPRECATE & _CRT_NONSTDC_NO_DEPRECATE
_SCL_SECURE_NO_DEPRECATE? :-)
Yes that worked perfectly, thank you very much indeed :-) .
You are welcome :-) If you prefer, you can also disable the warning (from the command line, in the IDE, or programmatically with #pragma warning) or you can increase its level (by default it is a level 1 warning, but you can move it to level 4, for instance). Or you could prepare wrapping headers, as hinted at in the thread "[general] MSVC71 Warnings Off?"; that's in line with the general suggestions of Alexandrescu/Sutter "C++ Coding Standards". -- [ Gennaro Prota, C++ developer. Library designer. ] [ For Hire http://gennaro-prota.50webs.com/ ]
To ignore the "safe library" warnings all you should need are _CRT_SECURE_NO_DEPRECATE (for C run-time library) and _SCL_SECURE_NO_DEPRECATE (for C++ STL library). The other define, _CRT_NONSTDC_NO_DEPRECATE, is for something else entirely. This define gives a warning if you use any common, but non-standard function names. For example, itoa instead of _itoa. I don't know for sure but I would be surprised if boost used of any of these non-standard names as they would not be guaranteed to exist on all compilers. -- Bill --
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Gennaro Prota Sent: Tuesday, August 15, 2006 4:43 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [format] When compiling with vc8 I get a warning
On Tue, 15 Aug 2006 22:18:49 +0100, Eoin
wrote: Hello, when compiling one of my projects which uses Boost.Format I get the compiler warning shown below. I have defined both _CRT_SECURE_NO_DEPRECATE & _CRT_NONSTDC_NO_DEPRECATE
_SCL_SECURE_NO_DEPRECATE? :-)
Yes that worked perfectly, thank you very much indeed :-) .
You are welcome :-) If you prefer, you can also disable the warning (from the command line, in the IDE, or programmatically with #pragma warning) or you can increase its level (by default it is a level 1 warning, but you can move it to level 4, for instance). Or you could prepare wrapping headers, as hinted at in the thread "[general] MSVC71 Warnings Off?"; that's in line with the general suggestions of Alexandrescu/Sutter "C++ Coding Standards".
-- [ Gennaro Prota, C++ developer. Library designer. ] [ For Hire http://gennaro-prota.50webs.com/ ]
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Bill Buklis
-
Eoin
-
Gennaro Prota