Commit 2023ab6e authored by Mark Olesen's avatar Mark Olesen
Browse files

added xfer<T>::null()

parent 8ffa04c8
...@@ -102,6 +102,11 @@ public: ...@@ -102,6 +102,11 @@ public:
inline ~xfer(); inline ~xfer();
// Member Functions
//- Return a null object reference
inline static const xfer<T>& null();
// Member Operators // Member Operators
//- Transfer the contents into the object //- Transfer the contents into the object
......
...@@ -77,6 +77,16 @@ inline Foam::xfer<T>::~xfer() ...@@ -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 * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class T> template<class T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment