[Bug c++/64372] Spurious warning with throw in ternary operator returning const reference

tavianator at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 22 07:38:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64372

--- Comment #4 from Tavian Barnes <tavianator at gmail dot com> ---
I meant to include -std=c++11 in the OP, it still happens with that flag set. 
Good suggestion for the replacement though.  The actual code was closer to i <
length ? a[i] : throw ... but I guess that can become (i < length ? a : throw
...)[i].



More information about the Gcc-bugs mailing list