This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Is this a bug?
- From: "S. Loisel" <loisel at math dot mcgill dot ca>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 13 Apr 2003 19:23:27 -0700
- Subject: Is this a bug?
I apologize for my probably impertinence. I don't know if this is a
known bug, or if I'm just misusing something. I've got a relatively
fresh cygwin (probably a couple of weeks old.)
$ g++ --version
g++ (GCC) 3.2 20020927 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The following code
#include <map>
#include <stdio.h>
int main()
{
std::map<int,int, std::less<int> > foo;
foo[0]=0;
foo[2]=2;
printf("%i %i\n",(*foo.lower_bound(1)).first,
(*foo.upper_bound(1)).first);
return 0;
}
produces this:
$ g++ bug.C -o bug
$ ./bug
2 2
What am I misunderstanding?
Thanks,
Sebastien Loisel
P.S. feel free to cc me in answers, I am not subscribed to this list,
although I will keep an eye on the web archives for the next while.