MSVC warning suppression - fixes #3599.

[SVN r59439]
This commit is contained in:
John Maddock
2010-02-03 12:10:56 +00:00
parent e875287d55
commit fb72e72640
2 changed files with 7 additions and 0 deletions

View File

@ -282,6 +282,7 @@ namespace boost {
static reference failed_rangecheck () { static reference failed_rangecheck () {
std::out_of_range e("attempt to access element of an empty array"); std::out_of_range e("attempt to access element of an empty array");
boost::throw_exception(e); boost::throw_exception(e);
#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC)
// //
// We need to return something here to keep // We need to return something here to keep
// some compilers happy: however we will never // some compilers happy: however we will never
@ -289,6 +290,7 @@ namespace boost {
// //
static T placeholder; static T placeholder;
return placeholder; return placeholder;
#endif
} }
}; };
#endif #endif

View File

@ -5,6 +5,11 @@
* http://www.boost.org/LICENSE_1_0.txt) * 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 <algorithm>
#include <functional> #include <functional>
#include <boost/array.hpp> #include <boost/array.hpp>