diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index de9d05befd..c64fd8540c 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -140,12 +140,6 @@ public: // Member operators - #ifdef NON_CONST_TMP - //- Deprecated non-const dereference operator. - // Use ref() where non-const access is required - inline T& operator()(); - #endif - //- Const dereference operator inline const T& operator()() const; diff --git a/src/OpenFOAM/memory/tmp/tmpI.H b/src/OpenFOAM/memory/tmp/tmpI.H index 48ff386b6e..42c1e5903d 100644 --- a/src/OpenFOAM/memory/tmp/tmpI.H +++ b/src/OpenFOAM/memory/tmp/tmpI.H @@ -247,27 +247,6 @@ inline void Foam::tmp::clear() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -#ifdef NON_CONST_TMP -template -inline T& Foam::tmp::operator()() -{ - if (isTmp()) - { - if (!ptr_) - { - FatalErrorInFunction - << typeName() << " deallocated" - << abort(FatalError); - } - } - - // Const-ness is automatically cast-away which is why this operator is - // deprecated. Use ref() where non-const access is required. - return *ptr_; -} -#endif - - template inline const T& Foam::tmp::operator()() const {