This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Bug in GCC 4.5 c++0x version of std::list<T>::merge(&&)?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Benjamin Redelings I <benjamin_redelings at ncsu dot edu>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 8 Dec 2009 08:38:05 +0000
- Subject: Re: Bug in GCC 4.5 c++0x version of std::list<T>::merge(&&)?
- References: <4B1DCA67.5070001@ncsu.edu> <4348dea50912080026p49a204cbs8084f695acc0a2a@mail.gmail.com>
2009/12/8 Jonathan Wakely:
> 2009/12/8 Benjamin Redelings I:
>> Hi,
>
> Hi,
> 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
>> from:
>>
>> list<_Tp, _Alloc>::
>> #ifdef __GXX_EXPERIMENTAL_CXX0X__
>> merge(list&& __x)
>> #else
>> merge(list& __x)
>> #endif
>>
>> 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);
>
> See http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133
> which covers a similar issue with splice.
I've requested that overloads of list::merge be added as well, watch
that issue to see the outcome.
Jonathan