Yeah, with C++11 and move semantics you do not have to create any specific
swap functions anymore, the STL one should just do the right thing.

Andreas

On 09/05/2013 14:52, "Nilay Vaish" <[email protected]> wrote:

>On Thu, 9 May 2013, Andreas Hansson wrote:
>
>>
>>
>>> On May 9, 2013, 4:11 a.m., Nilay Vaish wrote:
>>>> src/mem/cache/mshr.cc, line 407
>>>> <http://reviews.gem5.org/r/1864/diff/1/?file=35375#file35375line407>
>>>>
>>>>     Can you comment on how this swap is performed?
>>
>> You mean add a comment in the code? It's using move semantics (rvalues)
>>and is the default STL swap implementation.
>>
>>
>
>I was concerned about the time complexity of swap() function. I later
>checked the documentation which stated that its constant time.
>
>--
>Nilay
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to