Is this a bug or lack of understanding?

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue Apr 18 13:49:00 GMT 2000


>     struct s {
>         bool operator()(string s1, string s2) {
>             return (s1.size() < s2.size()
>                     || s1 < s2);
>         }
>     };

Shouldn't that be

    struct s {
        bool operator()(string s1, string s2) {
            return (s1.size() < s2.size()
		    or (s1.size() == s2.size() and s1 < s2));
        }
    };

instead?

Regards,
Martin


More information about the Libstdc++ mailing list