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:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user