Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-01-26 17:22:34


Sean Kelly wrote:
>Reece Dunn wrote:
> > For the Dinkumware library supplied with VC,
>BOOST_STD_EXTENSION_NAMESPACE
> > is defined to be std wich works, but the latest version that comes with
> > VC7.1 deprecates the version in the std namespace and provides a version
> > in the stdext namespace. The problem is that:
>..
> > will generate too many 'deprecated function' warnings in VC7.1, making
>it
> > harder to find actual errors!
>
>Why not just disable that warning with a #pragma? I already do this
>regularly with the "debug symbol name too long" message and a few others.

The problem is you'd need to either place the pragmas around all the usages
of BOOST_STD_EXTENSION_NAMESPACE::hash_xxx with VC guards, e.g.:

#if defined(BOOST_MSVC)
# pragma warning( push )
# pragma warning( disable : ... ) // remove deprecated warning
#endif

   // use BOOST_STD_EXTENSION_NAMESPACE::hash_xxx here

#if defined(BOOST_MSVC)
# pragma warning( pop )
#endif

This is, IMHO, an ugly solution. The other option requires adding the
disable warning on the command-line which is not good since it requires
altering makefiles or project settings and is thus not portable.

Regards,
Reece

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger


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