U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Thu Sep 10 06:29:57 GMT+2 2026

Total time taken to generate the page: 0.00620 seconds