Project

General

Profile

Design #1446

Start using C++14 "move" capability

Added by John Abbott about 4 years ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
Improving
Target version:
Start date:
12 Mar 2020
Due date:
% Done:

10%

Estimated time:
Spent time:

Description

C++14 (maybe even C++11?) offer an appealing notion of "move ctor" which avoid some deep copies.

We should adapt our impl to use this feature. This will surely take some time (and produce little visible benefit).


Related issues

Related to CoCoALib - Design #1225: Move to C++14 (skipping C++11)In Progress2018-09-06

Related to CoCoA-5 - Design #1519: Interpreter fn Value::from can use std::move?New2020-10-26

History

#1 Updated by John Abbott about 4 years ago

  • Related to Design #1225: Move to C++14 (skipping C++11) added

#2 Updated by John Abbott about 4 years ago

We need to do this piecemeal as many different classes must be considered. Besided modifying the class, we will probably have to insert some calls to std::move in a few places (it could take along time to find most of these).

Here is a list of the classes we need to consider; I'll mark with "done" those which have already been updated:
  • BigInt (2020-07-28: added move ctor)
  • BigRat (2020-10-05: added move ctor)
  • RingElem
  • ...

I should probably re-read Scott Meyers's book first...

PS I have set the target as 0.99720, but do not expect to finish by then; I just want to make sure that this task is not forgotten!

#3 Updated by John Abbott over 3 years ago

  • Target version changed from CoCoALib-0.99800 to CoCoALib-0.99850

#4 Updated by John Abbott over 3 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
Here are some fns to consider changing:
  • myCharacteristic
  • others???

#5 Updated by John Abbott over 3 years ago

  • Related to Design #1519: Interpreter fn Value::from can use std::move? added

#6 Updated by John Abbott about 2 months ago

  • Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880

Also available in: Atom PDF