mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added xfer<T>::null()
This commit is contained in:
@ -102,6 +102,11 @@ public:
|
||||
|
||||
inline ~xfer();
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return a null object reference
|
||||
inline static const xfer<T>& null();
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Transfer the contents into the object
|
||||
|
||||
@ -77,6 +77,16 @@ inline Foam::xfer<T>::~xfer()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
inline const Foam::xfer<T>& Foam::xfer<T>::null()
|
||||
{
|
||||
xfer<T>* nullPtr = reinterpret_cast<xfer<T>*>(0);
|
||||
return *nullPtr;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user