|
Boost-Commit : |
From: nesotto_at_[hidden]
Date: 2008-02-07 09:41:05
Author: nesotto
Date: 2008-02-07 09:41:04 EST (Thu, 07 Feb 2008)
New Revision: 43155
URL: http://svn.boost.org/trac/boost/changeset/43155
Log:
iterator_range disables msvc warning 4996
<http://svn.boost.org/trac/boost/ticket/1565>
[range] sub_range assignment issue
<http://svn.boost.org/trac/boost/ticket/1284>
Text files modified:
trunk/boost/range/iterator_range.hpp | 13 +++++++++----
trunk/boost/range/sub_range.hpp | 12 ++++++++----
2 files changed, 17 insertions(+), 8 deletions(-)
Modified: trunk/boost/range/iterator_range.hpp
==============================================================================
--- trunk/boost/range/iterator_range.hpp (original)
+++ trunk/boost/range/iterator_range.hpp 2008-02-07 09:41:04 EST (Thu, 07 Feb 2008)
@@ -11,6 +11,11 @@
#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
#define BOOST_RANGE_ITERATOR_RANGE_HPP
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+ #pragma warning( push )
+ #pragma warning( disable : 4996 )
+#endif
+
// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
#ifndef BOOST_OLD_IOSTREAMS
@@ -38,10 +43,6 @@
#endif // _STLP_NO_IOSTREAMS
#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.
\c iterator_range is a simple wrapper of iterator pair idiom. It provides
@@ -639,5 +640,9 @@
#undef BOOST_OLD_IOSTREAMS
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+ #pragma warning( pop )
+#endif
+
#endif
Modified: trunk/boost/range/sub_range.hpp
==============================================================================
--- trunk/boost/range/sub_range.hpp (original)
+++ trunk/boost/range/sub_range.hpp 2008-02-07 09:41:04 EST (Thu, 07 Feb 2008)
@@ -11,12 +11,12 @@
#ifndef BOOST_RANGE_SUB_RANGE_HPP
#define BOOST_RANGE_SUB_RANGE_HPP
-#include <boost/detail/workaround.hpp>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+ #pragma warning( push )
#pragma warning( disable : 4996 )
#endif
+#include <boost/detail/workaround.hpp>
#include <boost/range/config.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/range/value_type.hpp>
@@ -46,7 +46,7 @@
sub_range() : base()
{ }
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
sub_range( const sub_range& r )
: base( static_cast<const base&>( r ) )
{ }
@@ -163,5 +163,9 @@
} // namespace 'boost'
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)
+ #pragma warning( pop )
+#endif
+
#endif
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