From fb72e72640a9467ca062d75f4c2f285d085808b6 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 3 Feb 2010 12:10:56 +0000 Subject: [PATCH] MSVC warning suppression - fixes #3599. [SVN r59439] --- include/boost/array.hpp | 2 ++ test/array2.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/boost/array.hpp b/include/boost/array.hpp index d58b93a..c95bb09 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -282,6 +282,7 @@ namespace boost { 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 @@ namespace boost { // static T placeholder; return placeholder; +#endif } }; #endif diff --git a/test/array2.cpp b/test/array2.cpp index abbc745..1c8ccf8 100644 --- a/test/array2.cpp +++ b/test/array2.cpp @@ -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 #include #include