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

--- Comment #4 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-08-28 13:53:18 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > The fix is to remove the constexpr from array::at, which isn't required by 
> > the
> > standard anyway:
> 
> It's not required, but I would like to encourage you to keep it if possible,
> because otherwise it would like as if the constexpr extension paper 

Please read that as: "it would *look* like"

> Replace
> 
>     return __n < _Nm ? 
>            _M_instance[__n] : throw out_of_range(__N("array::at"));
> 
> by
> 
>     return __n < _Nm ? 0 : throw out_of_range(__N("array::at")),  
> _M_instance[__n];

Alternatively prevent any value evaluation at all:

return __n < _Nm ? void() : throw out_of_range(__N("array::at")),  
 _M_instance[__n];

Reply via email to