This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/37347] valarray::operator[](slice) const returns wrong type.



------- Comment #5 from crazydm at gmail dot com  2008-09-03 11:53 -------
(In reply to comment #4)
> This is not a bug, see 26.3.1/3: "Any function returning a valarray<T> is
> permitted to return an object of another type, provided all the const member
> functions of valarray<T> are also applicabel to this type". CC-ing Gaby, to be
> sure.
> 
Well, but it is not applicabel to helper class slice_array. May be this bug is
not in vallaray, but in slice_array, that must have copy constructor whith a
such type. I do not know, but I think that operator[](slice) const can be used
to create slice_arrays, because it is designated for a such task.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]