Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59439 - in trunk: boost libs/array/test
From: john_at_[hidden]
Date: 2010-02-03 07:10:57


Author: johnmaddock
Date: 2010-02-03 07:10:56 EST (Wed, 03 Feb 2010)
New Revision: 59439
URL: http://svn.boost.org/trac/boost/changeset/59439

Log:
MSVC warning suppression - fixes #3599.
Text files modified:
   trunk/boost/array.hpp | 2 ++
   trunk/libs/array/test/array2.cpp | 5 +++++
   2 files changed, 7 insertions(+), 0 deletions(-)

Modified: trunk/boost/array.hpp
==============================================================================
--- trunk/boost/array.hpp (original)
+++ trunk/boost/array.hpp 2010-02-03 07:10:56 EST (Wed, 03 Feb 2010)
@@ -282,6 +282,7 @@
         static reference failed_rangecheck () {
                 std::out_of_range e("attempt to access element of an empty array");
                 boost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC)
                 //
                 // We need to return something here to keep
                 // some compilers happy: however we will never
@@ -289,6 +290,7 @@
                 //
                 static T placeholder;
                 return placeholder;
+#endif
             }
     };
 #endif

Modified: trunk/libs/array/test/array2.cpp
==============================================================================
--- trunk/libs/array/test/array2.cpp (original)
+++ trunk/libs/array/test/array2.cpp 2010-02-03 07:10:56 EST (Wed, 03 Feb 2010)
@@ -5,6 +5,11 @@
  * http://www.boost.org/LICENSE_1_0.txt)
  */
 
+#ifndef _SCL_SECURE_NO_WARNINGS
+// Suppress warnings from the std lib:
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
 #include <algorithm>
 #include <functional>
 #include <boost/array.hpp>


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