Skip to content

Commit

Permalink
Remove obsolete workaround from failed_rangecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 26, 2025
1 parent 0a72026 commit c95d855
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions include/boost/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,19 +303,10 @@ namespace boost {
BOOST_CXX14_CONSTEXPR void fill (const T& ) {}

// check range (may be private because it is static)
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) && !defined(__PATHSCALE__))
//
// We need to return something here to keep
// some compilers happy: however we will never
// actually get here....
//
static T placeholder;
return placeholder;
#endif
}
static reference failed_rangecheck ()
{
boost::throw_exception( std::out_of_range( "attempt to access element of an empty array" ) );
}
};

// comparisons
Expand Down

0 comments on commit c95d855

Please sign in to comment.