Home » U++ Library support » U++ Core » Please help! New transfer semantic issue!
Re: Please help! New transfer semantic issue! [message #46174 is a reply to message #46173] |
Tue, 22 March 2016 21:47 |
Lance
Messages: 527 Registered: March 2007
|
Contributor |
|
|
Contained members Array<Segment> segs and Array<ElementPin> lines are the culprits.
Mirek would be able to give you the best suggestion. However explicitly define a copy constructor and a move constructor will fix the problem.
Something like
// public:
Line(const Line& ln):p1(ln.p1),p2(ln.p2), elp1(???),elp2(???),
segs(ln.segs,1), // make a deep copy
lines(ln.lines,1) // ditto
{}
Line(Line&& ln): p1(ln.p1),p2(ln.p2),elp1(???), elp2(???),
segs(pick(ln.segs)),
lines(pick(ln.lines))
{}
|
|
|
Goto Forum:
Current Time: Thu May 09 00:38:25 CEST 2024
Total time taken to generate the page: 0.01479 seconds
|