autoPtr gets "empty()" method that can be used instead of "! ...valid()"

This commit is contained in:
Mark Olesen
2009-01-10 10:38:53 +01:00
parent 5ba68da75b
commit 16aaf5b54e
25 changed files with 114 additions and 98 deletions

View File

@ -49,7 +49,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class tmp Declaration
Class tmp Declaration
\*---------------------------------------------------------------------------*/
template<class T>
@ -91,11 +91,15 @@ public:
// Access
//- Is this really a temporary object
//- Return true if this is really a temporary object
inline bool isTmp() const;
//- Is this temporary object valid, i.e. is it a reference
// or a temporary that has been allocated
//- Return true if this temporary object empty,
// ie, a temporary without allocation
inline bool empty() const;
//- Is this temporary object valid,
// ie, it is a reference or a temporary that has been allocated
inline bool valid() const;
// Edit