http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48038
--- Comment #21 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-03-09 15:27:49 UTC --- On 9 Mar, 2011, at 1:46 PM, paolo.carlini at oracle dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48038 > > --- Comment #16 from Paolo Carlini <paolo.carlini at oracle dot com> > 2011-03-09 12:46:07 UTC --- > By the way, as a note to Vincenzo, in general I don't really see the point of > comparators taking the arguments by value, thus ruling out move-only types, > among other issues (that clearly shows up in other areas of C++0x). In other > terms, I don't see the temporary workaround for this issue as a proper > workaround, more as a best practice ;) > The bug showed up initially in a real-software use case were we use a vector of smart pointer which are typically handled by value. I then resued an old test of mine to fast prove that the issue was in gcc 4.6. I will try to build an example using std::shared_ptr (ours are boost intrusive shared pointers!) if is of interest for you. vincenzo