G++ STL: allocators hell

Hi everybody, I have a simple question. I'm using G++ 4.5 and try to provide a custom allocator to a std::set but I can't get my code to compile.
Everything works fine with sequential containers (vector, list... ) but doesn't work for maps and sets.

The problem is that I can't even get this code to compile:
1
2
3
typedef std::set< void*, std::allocator<void*> > my_set;
my_set s;
s.insert(0);


G++ complains about a missing operator() taking two void * as parameters in the allocator :(
Sounds very much like a bug to me...

If anyone has any idea.
OK no worries... I got to learn how to read a man... the second argument is the comparator.

In case someone read my post and has the same problem: RTFM!
Topic archived. No new replies allowed.