Go to the documentation of this file.
79 mutable refType type_;
85 inline void operator++();
111 template<
class... Args>
119 template<
class U,
class... Args>
126 inline constexpr
tmp() noexcept;
129 inline constexpr
tmp(std::nullptr_t) noexcept;
132 inline explicit
tmp(
T*
p);
135 inline
tmp(const
T& obj) noexcept;
139 inline
tmp(
tmp<
T>&& t) noexcept;
144 inline
tmp(const
tmp<
T>&& t) noexcept;
151 inline
tmp(const
tmp<
T>& t,
bool reuse);
163 inline
bool isTmp() const noexcept;
166 inline
bool empty() const noexcept;
170 inline
bool valid() const noexcept;
173 inline
bool movable() const noexcept;
182 inline
T*
get() noexcept;
185 inline const
T*
get() const noexcept;
190 inline const
T&
cref() const;
195 inline
T&
ref() const;
208 inline
T*
ptr() const;
212 inline
void clear() const noexcept;
216 inline
void reset() noexcept;
219 inline
void reset(
T*
p) noexcept;
222 inline
void reset(
tmp<
T>&& other) noexcept;
225 inline
void cref(const
T& obj) noexcept;
228 inline
void swap(
tmp<
T>& other) noexcept;
235 inline const
T& operator()() const;
238 inline operator const
T&() const;
242 inline const
T* operator->() const;
246 inline
T* operator->();
249 explicit inline operator
bool() const noexcept;
253 inline
void operator=(
T*
p);
257 inline
void operator=(const
tmp<
T>& t);
260 inline
void operator=(
tmp<
T>&& other) noexcept;
267 void operator=(std::nullptr_t) = delete;
T & constCast() const
Non-const dereference, even if the object is const.
A class for handling words, derived from Foam::string.
void clear() const noexcept
A class for managing temporary objects.
Reference counter for various OpenFOAM components.
bool empty() const noexcept
True if this is a non-null managed pointer.
T element_type
Type of object being managed or referenced.
bool isTmp() const noexcept
True if this is a managed pointer (not a const reference)
static tmp< T > NewFrom(Args &&... args)
Construct tmp from derived type with forwarding arguments.
void Swap(DynamicList< T, SizeMin1 > &a, DynamicList< T, SizeMin2 > &b)
void reset() noexcept
Release ownership of managed temporary object.
T * get() noexcept
Return pointer without nullptr checking.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T * pointer
Pointer to type of object being managed or referenced.
word typeName() const
Return type-name of the tmp, constructed from type-name of T.
void swap(tmp< T > &other) noexcept
Swaps the managed object with other.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
constexpr tmp() noexcept
Construct with no managed pointer.
bool valid() const noexcept
Foam::argList args(argc, argv)
Foam::refCount refCount
Reference counter class.
bool movable() const noexcept
True if this is a non-null managed pointer with a unique ref-count.