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

--- Comment #6 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-08-28 14:07:11 UTC ---
(In reply to comment #5)
> The paper does have implementation experience, and experience shows we got it
> wrong ;)

We implemented it wrong is a different message than "we couldn't implement it"

> 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.

Yes, this should also work (I noticed that gcc gets an ICE in any of my
suggested forms. I will investigate this separately)

Reply via email to