Skip to content

Commit fb72e72

Browse files
committed
MSVC warning suppression - fixes #3599.
[SVN r59439]
1 parent e875287 commit fb72e72

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/boost/array.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,15 @@ namespace boost {
282282
static reference failed_rangecheck () {
283283
std::out_of_range e("attempt to access element of an empty array");
284284
boost::throw_exception(e);
285+
#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC)
285286
//
286287
// We need to return something here to keep
287288
// some compilers happy: however we will never
288289
// actually get here....
289290
//
290291
static T placeholder;
291292
return placeholder;
293+
#endif
292294
}
293295
};
294296
#endif

test/array2.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* http://www.boost.org/LICENSE_1_0.txt)
66
*/
77

8+
#ifndef _SCL_SECURE_NO_WARNINGS
9+
// Suppress warnings from the std lib:
10+
# define _SCL_SECURE_NO_WARNINGS
11+
#endif
12+
813
#include <algorithm>
914
#include <functional>
1015
#include <boost/array.hpp>

0 commit comments

Comments
 (0)