View Issue Details

IDProjectCategoryView StatusLast Update
0003218OpenFOAMFeaturepublic2019-05-25 20:12
ReporterwwzhaoAssigned Tohenry 
PrioritynoneSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Versiondev 
Fixed in Versiondev 
Summary0003218: Use C++11 move semantics for containers
DescriptionCurrently, the code relies heavily on Xfer class template. It would be nice to use C++11 move semantics instead.
TagsNo tags attached.

Activities

henry

2019-04-09 10:03

manager   ~0010426

Sure, but OpenFOAM is 1.6million lines which I started writing in 1989 and predates STL by many years and the move semantics by decades.
Consistency is everything in maintainability so in order to replace Xfer and possibly even tmp with the C++11 move semantics OpenFOAM would require a massive rewrite. While this would be excellent and the code would certainly be improved by the change I have no idea how such huge maintenance task could be funded, we just don't receive anything like the funding necessary:

https://openfoam.org/news/funding-2018/
https://openfoam.org/news/funding-2019/
https://openfoam.org/maintenance/

henry

2019-04-11 11:40

manager   ~0010429

Requires maintenance funding.

henry

2019-05-25 20:12

manager   ~0010493

commit 30bea84facb2cc6190abd767b81c806ff2dd24ea (HEAD -> master, origin/master, origin/HEAD)
Author: Henry Weller <http://openfoam.org>
Date: Sat May 25 17:40:39 2019 +0100

    C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
    
    Replaced all uses of complex Xfer class with C++11 "move" constructors and
    assignment operators. Removed the now redundant Xfer class.
    
    This substantial changes improves consistency between OpenFOAM and the C++11 STL
    containers and algorithms, reduces memory allocation and copy overhead when
    returning containers from functions and simplifies maintenance of the core
    libraries significantly.

Issue History

Date Modified Username Field Change
2019-04-09 09:51 wwzhao New Issue
2019-04-09 10:03 henry Note Added: 0010426
2019-04-09 10:04 henry Priority low => none
2019-04-09 10:04 henry Severity trivial => feature
2019-04-11 11:40 henry Assigned To => henry
2019-04-11 11:40 henry Status new => closed
2019-04-11 11:40 henry Resolution open => suspended
2019-04-11 11:40 henry Note Added: 0010429
2019-05-25 20:12 henry Status closed => resolved
2019-05-25 20:12 henry Resolution suspended => fixed
2019-05-25 20:12 henry Fixed in Version => dev
2019-05-25 20:12 henry Note Added: 0010493