mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add operator* to refPtr - makes it more like autoPtr
- would ideally like the same for tmp, but there is too much existing code that uses a multiply operation that would be interpreted as a dereference.
This commit is contained in:
committed by
Andrew Heather
parent
d15a396a6a
commit
a76a3d760c
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -63,6 +63,7 @@ int main()
|
||||
auto tfld1 = refPtr<scalarField>::New(10, scalar(1));
|
||||
printInfo(tfld1, true);
|
||||
|
||||
Info<< nl << "Dereferenced: " << *tfld1 << nl;
|
||||
|
||||
Info<< nl << "Construct from autoPtr" << nl;
|
||||
refPtr<scalarField> tfld2(autoPtr<scalarField>::New(10, scalar(2)));
|
||||
|
||||
Reference in New Issue
Block a user