This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Is this a bug or lack of understanding?
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>,branko dot cibej at hermes dot si
- Subject: Re: Is this a bug or lack of understanding?
- From: Stephen Webb <stephen at bregmasoft dot com>
- Date: Wed, 19 Apr 2000 09:22:39 -0400
- Cc: Chris dot Picton at usko dot com,libstdc++ at sourceware dot cygnus dot com
- Organization: CyberSafe
- References: <200004182038.WAA06606@loewis.home.cs.tu-berlin.de>
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