René Bürgel <rbuergel@xxxxxx> writes: > Is the following code supposed to work in C++0x-Mode or am i just > doing something wrong? > > #include <memory> > #include <vector> > #include <algorithm> > > int main() > { > std::vector<std::unique_ptr<int> > v; > std::sort(v.begin(), v.end()); > } I think it is supposed to work. The standard says that the value must be Swappable, MoveConstructible, and MoveAssignable. I think that std::unique_ptr meets those requirements. I think this is a bug in libstdc++-v3. Looking at the code, I think this means that __introsort_loop can't assume that it can pass values to std::__median. Ian