mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
tmp: Added assignment to pointer operator to initialize null-tmp to an allocated object
This is a convenient method to set a null-constructed tmp in a conditional statement.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,7 +125,10 @@ public:
|
||||
//- Return const object pointer
|
||||
inline const T* operator->() const;
|
||||
|
||||
//- Assignment operator
|
||||
//- Assignment to pointer changing this tmp to a temporary T
|
||||
inline void operator=(T*);
|
||||
|
||||
//- Assignment transfering the temporary T to this tmp
|
||||
inline void operator=(const tmp<T>&);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user