Bug in GCC 4.5 c++0x version of std::list<T>::merge(&&)?
Tue Dec 8 08:26:00 GMT 2009
2009/12/8 Benjamin Redelings I:
I've CC'd the libstdc++ list, please reply there instead of the gcc list.
> It seems that many current uses of list<T>::merge( ) fail to compile with
> -std=c++0x, but I don't see a bug in bugzilla for this. Itseems to result
> list<_Tp, _Alloc>::
> #ifdef __GXX_EXPERIMENTAL_CXX0X__
> merge(list&& __x)
> merge(list& __x)
> For c++0x, don't we need BOTH versions, since lvalues no longer bind to
> rvalue references, or am I missing something?
The WP only has:
void merge(list<T,Allocator>&& x);
template <class Compare> void merge(list<T,Allocator>&& x, Compare comp);
which covers a similar issue with splice.
More information about the Libstdc++