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 » Community » Coffee corner » How would you design a good copy/move semantics system?
How would you design a good copy/move semantics system? [message #44023] Mon, 15 December 2014 15:08 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Ultimate Contributor
This is more of a question for people deeply familiar to the way copy-constructing works.

I was thinking of a system where:
- each class can have a copy and a move optionally
- copy works like the default copy constructor, except for classes where deep copies are needed
- move works pretty much the way it works in U++, but only destroys data that would be copied by a deep copy
- calling move on a class that does not have a move implemented will do a copy
- the rules apply based on class depth

This are the principles. I need to also do an implementation that has as low overhead as possible performance wise and that does not look particularly ugly.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extracting links challenge
Next Topic: Banana PI
Goto Forum:
  


Current Time: Mon Dec 06 15:58:11 CET 2021

Total time taken to generate the page: 0.02289 seconds