mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: refPtr/tmp is_reference() to complement is_pointer() method
STYLE: return nullptr instead of tmp<...>() for failure
This commit is contained in:
@ -191,10 +191,13 @@ public:
|
||||
bool good() const noexcept { return bool(ptr_); }
|
||||
|
||||
//- If the stored/referenced content is const
|
||||
bool is_const() const noexcept { return type_ == CREF; }
|
||||
bool is_const() const noexcept { return (type_ == CREF); }
|
||||
|
||||
//- True if this is a managed pointer (not a reference)
|
||||
bool is_pointer() const noexcept { return type_ == PTR; }
|
||||
bool is_pointer() const noexcept { return (type_ == PTR); }
|
||||
|
||||
//- True if this is a reference (not a pointer)
|
||||
bool is_reference() const noexcept { return (type_ != PTR); }
|
||||
|
||||
//- True if this is a non-null managed pointer with a unique ref-count
|
||||
inline bool movable() const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user