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 » 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 Go to previous messageGo to previous message
Lance is currently offline  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))
                    {}



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: conversion from String to wchar_t
Next Topic: How to handle a lack of memory
Goto Forum:
  


Current Time: Thu May 09 00:38:25 CEST 2024

Total time taken to generate the page: 0.01479 seconds