This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37347] valarray::operator[](slice) const returns wrong type.
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2008 12:08:19 -0000
- Subject: [Bug libstdc++/37347] valarray::operator[](slice) const returns wrong type.
- References: <bug-37347-16660@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from paolo dot carlini at oracle dot com 2008-09-03 12:08 -------
Also note: in your original message you have wrong the relevant bit:
> valarray::operator[](slice) const returns _Expr<_SClos<_ValArray,_Tp>, _Tp>
> instead of slice_array<Tp>,
^^^^^^^^^^^^^^^
The return type, to which 26.3.1/3 applies, is valarray<T>, *not*
slice_array<T>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37347