Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2007-10-23 15:51:00


Author: nesotto
Date: 2007-10-23 15:50:59 EDT (Tue, 23 Oct 2007)
New Revision: 40376
URL: http://svn.boost.org/trac/boost/changeset/40376

Log:
displabed some warnings and applied Ticket #1284: sub_range_copy.patch
Text files modified:
   trunk/boost/range/iterator_range.hpp | 3 +++
   trunk/boost/range/sub_range.hpp | 30 +++++++++++++-----------------
   2 files changed, 16 insertions(+), 17 deletions(-)

Modified: trunk/boost/range/iterator_range.hpp
==============================================================================
--- trunk/boost/range/iterator_range.hpp (original)
+++ trunk/boost/range/iterator_range.hpp 2007-10-23 15:50:59 EDT (Tue, 23 Oct 2007)
@@ -36,6 +36,9 @@
 #endif
 #include <cstddef>
 
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+ #pragma warning( disable : 4996 )
+#endif
 
 /*! \file
     Defines the \c iterator_class and related functions.

Modified: trunk/boost/range/sub_range.hpp
==============================================================================
--- trunk/boost/range/sub_range.hpp (original)
+++ trunk/boost/range/sub_range.hpp 2007-10-23 15:50:59 EDT (Tue, 23 Oct 2007)
@@ -11,6 +11,10 @@
 #ifndef BOOST_RANGE_SUB_RANGE_HPP
 #define BOOST_RANGE_SUB_RANGE_HPP
 
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+ #pragma warning( disable : 4996 )
+#endif
+
 #include <boost/range/config.hpp>
 #include <boost/range/iterator_range.hpp>
 #include <boost/range/value_type.hpp>
@@ -38,16 +42,12 @@
     public:
         sub_range() : base()
         { }
-
-/*
- template< class ForwardRange2 >
- sub_range( sub_range<ForwardRange2> r ) :
-
-#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
- base( impl::adl_begin( r ), impl::adl_end( r ) )
-#else
- base( r )
-#endif */
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+ sub_range( const sub_range& r )
+ : base( static_cast<const base&>( r ) )
+ { }
+#endif
 
         template< class ForwardRange2 >
         sub_range( ForwardRange2& r ) :
@@ -86,15 +86,11 @@
         {
             base::operator=( r );
             return *this;
- }
+ }
 
- sub_range& operator=( sub_range r )
+ sub_range& operator=( const sub_range& r )
         {
- //
- // argument passed by value to avoid
- // const_iterator to iterator conversion
- //
- base::operator=( r );
+ base::operator=( static_cast<const base&>(r) );
             return *this;
         }
         


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk