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 #46841 is a reply to message #46839] Fri, 26 August 2016 17:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
With C++11, the reason is to make 'clone' explicit.

We want to prevent this:

Vector<int> a, b;

a = b;

and force the user to write either

a = pick(b);

or

a = clone(b);

(That said, maybe there could be a better way how to achieve this, maybe make copy-construtor explict would work too, but addition int parameter is sort of legacy).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: strcpy issue
Next Topic: HttpRequest issue
Goto Forum:
  


Current Time: Sat Apr 26 21:52:36 CEST 2025

Total time taken to generate the page: 0.02889 seconds