Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Vector(const Vector& v, int)
Re: Vector(const Vector& v, int) [message #46847 is a reply to message #46841] Fri, 26 August 2016 23:47 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Fri, 26 August 2016 11:13
With C++11, the reason is to make 'clone' explicit.
(That said, maybe there could be a better way how to achieve this, maybe make copy-constructor explicit would work too, but addition int parameter is sort of legacy).

Thank you.
Explicit copy-constructor doesn't force to call "clone" for some reason.
Maybe, it makes sense to make pick/clone optional, and let compiler auto-generate default copy constructor? This legacy move semantics doesn't seem to have much sense when compiler already does good job moving temporary data for you. You still will be able to call "pick". Typing code which is not really necessary is very annoying ...

Thanks.


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: strcpy issue
Next Topic: HttpRequest issue
Goto Forum:
  


Current Time: Mon May 20 17:44:58 CEST 2024

Total time taken to generate the page: 0.03032 seconds