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