Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2006-08-06 08:00:12


Gennaro Prota wrote:
> On Sat, 5 Aug 2006 16:46:29 +0100, "John Maddock"
> <john_at_[hidden]> wrote:
>
> >We seem to have acquired even more intrusive warnings from lexical_cast now,
> >for example a quickbook build yields:
> >
> >[42 lines warning message snipped]
>
> Just to reassure the onlookers this was *1* message :-s
>
> >which is pretty unpleasant :-(
>
> Don't be sad, John. Fixed at 0.45am. Specially for you O:-)

Even worse. The test now fails. Your #ifdef excluded code for compilers
other then MSVC. Please, decide about BOOST_MSVC vs _MSC_VER and fix the
bug.

Index: boost/lexical_cast.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/lexical_cast.hpp,v
retrieving revision 1.23
diff -u -r1.23 lexical_cast.hpp
--- boost/lexical_cast.hpp 5 Aug 2006 22:45:53 -0000 1.23
+++ boost/lexical_cast.hpp 6 Aug 2006 11:56:19 -0000
@@ -140,6 +140,7 @@
 # pragma warning( push )
   // conditional expression is constant
 # pragma warning( disable : 4127 )
+#endif

                 typedef std::numeric_limits<Target> t;
                 typedef std::numeric_limits<Source> s;
@@ -149,6 +150,7 @@
                 else if(s::is_specialized)
                     stream.precision(1 + s::digits10);

+#if (defined _MSC_VER)
 # pragma warning( pop )
 #endif

BTW, look at these lines in boost/config/select_compiler_config.hpp:

// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"

-- 
Alexander Nasonov
Project Manager at Akmosoft ( http://www.akmosoft.com )
Blog: http://nasonov.blogspot.com
Email: $(FirstName) dot $(LastName) at gmail dot com

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