https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113160
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- > Any function returning a valarray is permitted to return an object > of another type, provided all the const member functions of valarray > are also applicable to this type. This means you can do v[0] on the type, it doesn't mean you can convert it to a const valarray&