create set with advanced allocator: how to create default Compare() obj?

I need smth like that:

TBufferedAllocator<int> MyAlloc(my_pool);
std::set<foo, std::less<foo>, TBufferedAllocator<int>>
v_foo(std::less<foo>(), MyAlloc);


Of couse, std::less<foo>() is not what i should do...
And in gcc 4.7.2 next syntax doesn't work too:

std::set<foo, std::less<foo>, TBufferedAllocator<int>> v_foo(MyAlloc);

despite it in c++11 standart.
Command line:
g++ -std=c++11 test_set.cpp -g
gcc (or, rather, libstdc++) fell far behind on many things C++11: regular expressions and unicode are the big ones, but allocators too, it seems.

Your example (after I defined all the undefined symbols) compiles fine with clang++ (using libc++) and with Visual Studio 2012.
Topic archived. No new replies allowed.