This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]New feature to all kind of stl container.vector::data_move() returns vector::data() that can be moved,just as unique_ptr::release() to unique_ptr::get()


Same as my original idea.
my vector<T>::data_move() can be exactly in this function form
T* data()&&;
And thanks to Marc Glisse for works on std::string.
Since it's a real nead,anyone consider my idea acceptable to libstdc++?



------------------ Original ------------------

On Thu, 8 Jan 2015, Jonathan Wakely wrote:

> On 8 January 2015 at 07:24, Marc Glisse wrote:
>
>> This should be spelled:
>> std::move(ss).str()
>
> But str() still has to return a copy. That would help if there was an
> rvalue-ref-qualified version str()&&

Yes, that's exactly my point ;-)
I was planning to write a patch after the switch to the new std::string, 
but having 2 different versions of string in parallel means I am wary of 
touching anything related.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]