mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: make some tmp, refPtr constructors constexpr
This commit is contained in:
@ -135,7 +135,7 @@ public:
|
||||
inline explicit tmp(T* p);
|
||||
|
||||
//- Construct for a const reference to an object.
|
||||
inline tmp(const T& obj) noexcept;
|
||||
inline constexpr tmp(const T& obj) noexcept;
|
||||
|
||||
//- Move construct, transferring ownership.
|
||||
// Does not affect ref-count
|
||||
@ -236,12 +236,6 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Identical to cref() method.
|
||||
inline const T& operator()() const;
|
||||
|
||||
//- Cast to underlying data type, using the cref() method.
|
||||
inline operator const T&() const;
|
||||
|
||||
//- Dereferences (const) pointer to the managed object.
|
||||
// Fatal for a null managed pointer.
|
||||
inline const T* operator->() const;
|
||||
@ -250,6 +244,12 @@ public:
|
||||
// Fatal for a null managed pointer or if the object is const.
|
||||
inline T* operator->();
|
||||
|
||||
//- Return const reference to the object - same as cref() method.
|
||||
const T& operator()() const { return cref(); }
|
||||
|
||||
//- Cast to underlying data type, using the cref() method.
|
||||
operator const T&() const { return cref(); }
|
||||
|
||||
//- Non-null pointer/reference : valid()
|
||||
explicit operator bool() const noexcept { return ptr_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user