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]

Re: libstdc++/5619: std::valarray<T>::operator==(std::valarray<T>&) doesn't return bool


Synopsis: std::valarray<T>::operator==(std::valarray<T>&) doesn't return bool

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Wed Feb  6 16:20:57 2002
Responsible-Changed-Why:
    Analyzed.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Wed Feb  6 16:20:57 2002
State-Changed-Why:
    Not a bug. According to 26.3.3.2, operator== returns a
    valarray<bool> *not* a bool. Indeed, this one compiles:
    #include <valarray>
    
    int main(int argc, char* argv[])
    {
      std::valarray<double> a(1.2, 10);
      std::valarray<double> b(1.2, 10);
    
      //bool equal = ( a == b);
      std::valarray<bool> equal = ( a == b);
      //return int(equal);
    }
    
    Cheers, Paolo

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5619


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