Skip to content

Commit c95d855

Browse files
committed
Remove obsolete workaround from failed_rangecheck
1 parent 0a72026 commit c95d855

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

include/boost/array.hpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -303,19 +303,10 @@ namespace boost {
303303
BOOST_CXX14_CONSTEXPR void fill (const T& ) {}
304304

305305
// check range (may be private because it is static)
306-
static reference failed_rangecheck () {
307-
std::out_of_range e("attempt to access element of an empty array");
308-
boost::throw_exception(e);
309-
#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
310-
//
311-
// We need to return something here to keep
312-
// some compilers happy: however we will never
313-
// actually get here....
314-
//
315-
static T placeholder;
316-
return placeholder;
317-
#endif
318-
}
306+
static reference failed_rangecheck ()
307+
{
308+
boost::throw_exception( std::out_of_range( "attempt to access element of an empty array" ) );
309+
}
319310
};
320311

321312
// comparisons

0 commit comments

Comments
 (0)