Added copy constructors to classes with copy assignment operator defined

and copy assignment operator for classes with a copy constructor

This is often described as the rule of 3 (or rule of 5 in C++11 if move
constructors and assignment operators are also defined) and makes good sense in
ensuring consistency.  For classes in which the default bitwise copy constructor
or assignment operator are appropriate these are now specified explicitly using
the "= default" keyword if the other is explicitly defined fulfilling the rule
of 3 without the need to define the body of the function.
This commit is contained in:
Henry Weller
2019-06-05 23:32:22 +01:00
parent 74d45a1313
commit 00ae415b71
92 changed files with 200 additions and 642 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -171,6 +171,8 @@ public:
inline indexedVertex(Cell_handle f);
indexedVertex(const indexedVertex& p) = default;
// Member Functions