From bbd9fdb7bda2fc2cd0214488b41e319f944662f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Tue, 23 Oct 2007 19:50:59 +0000 Subject: [PATCH] displabed some warnings and applied Ticket #1284: sub_range_copy.patch [SVN r40376] --- include/boost/range/iterator_range.hpp | 3 +++ include/boost/range/sub_range.hpp | 30 +++++++++++--------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/include/boost/range/iterator_range.hpp b/include/boost/range/iterator_range.hpp index 41b30af..bcead14 100755 --- a/include/boost/range/iterator_range.hpp +++ b/include/boost/range/iterator_range.hpp @@ -36,6 +36,9 @@ #endif #include +#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. diff --git a/include/boost/range/sub_range.hpp b/include/boost/range/sub_range.hpp index 346c0e0..30daaea 100755 --- a/include/boost/range/sub_range.hpp +++ b/include/boost/range/sub_range.hpp @@ -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 #include #include @@ -38,16 +42,12 @@ namespace boost public: sub_range() : base() { } - -/* - template< class ForwardRange2 > - sub_range( sub_range 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( r ) ) + { } +#endif template< class ForwardRange2 > sub_range( ForwardRange2& r ) : @@ -86,15 +86,11 @@ namespace boost { 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(r) ); return *this; }