mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: COMP: handle compiler ambiguities for tmp vs movable references
- seen with gcc-4.9.4, but not with gcc-7 - provide additional constructors from tmp for DimensionedField, FieldField
This commit is contained in:
@ -304,6 +304,52 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
(
|
||||
const IOobject& io,
|
||||
const Mesh& mesh,
|
||||
const dimensionSet& ds,
|
||||
const Field<Type>& iField,
|
||||
const word& patchFieldType
|
||||
)
|
||||
:
|
||||
Internal(io, mesh, ds, iField),
|
||||
timeIndex_(this->time().timeIndex()),
|
||||
field0Ptr_(nullptr),
|
||||
fieldPrevIterPtr_(nullptr),
|
||||
boundaryField_(mesh.boundary(), *this, patchFieldType)
|
||||
{
|
||||
DebugInFunction
|
||||
<< "Copy construct from internal field" << nl << this->info() << endl;
|
||||
|
||||
readIfPresent();
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
(
|
||||
const IOobject& io,
|
||||
const Mesh& mesh,
|
||||
const dimensionSet& ds,
|
||||
Field<Type>&& iField,
|
||||
const word& patchFieldType
|
||||
)
|
||||
:
|
||||
Internal(io, mesh, ds, std::move(iField)),
|
||||
timeIndex_(this->time().timeIndex()),
|
||||
field0Ptr_(nullptr),
|
||||
fieldPrevIterPtr_(nullptr),
|
||||
boundaryField_(mesh.boundary(), *this, patchFieldType)
|
||||
{
|
||||
DebugInFunction
|
||||
<< "Move construct from internal field" << nl << this->info() << endl;
|
||||
|
||||
readIfPresent();
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user