Is this a bug or lack of understanding?
Stephen Webb
stephen@bregmasoft.com
Wed Apr 19 06:14:00 GMT 2000
On Tue, 18 Apr 2000, Martin v. Loewis wrote:
> > 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));
> }
> };
With that comparison functoid you don't need a multimap. You've got a primary and a seconday collation. Original
problem solved, QED.
Stephen M. Webb
Principle Consultant, Bregmasoft
More information about the Libstdc++
mailing list