http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54388

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-28 
13:55:36 UTC ---
The paper does have implementation experience, and experience shows we got it
wrong ;)

We could do:

  return __n < _Nm ? _M_instance[__n]
         : (std::__throw out_of_range(__N("array::at")), _M_instance[0]);

and still get rid of the code that's conditionally compiled on __EXCEPTIONS.

N.B. the second branch uses _M_instance[0] to avoid possible warnings about
out-of-bounds accesses.

Reply via email to