#include <userver/utils/resource_scopes.hpp>
A wrapper that provides utils::ResourceScopeStorage for the wrapped object.
The wrapped object is passed utils::ResourceScopeStorage& as the first argument to the constructor. Prefer this over storing ResourceScopeStorage as a field of the wrapped object itself. Use MakeWithResourceScopes when the caller needs a std::shared_ptr to the wrapped object.
Definition at line 181 of file resource_scopes.hpp.
Public Member Functions | |
| template<typename... Args> | |
| WithResourceScopes (std::in_place_t, Args &&... args) | |
| Constructs the wrapped object and passes the embedded utils::ResourceScopeStorage to it as the first argument. | |
| WithResourceScopes (WithResourceScopes &&)=delete | |
| WithResourceScopes & | operator= (WithResourceScopes &&)=delete |
| Wrapped & | operator* () &noexcept |
| Returns the wrapped object. | |
| const Wrapped & | operator* () const &noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Wrapped * | operator-> () noexcept |
| Returns the wrapped object. | |
| const Wrapped * | operator-> () const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
|
inlineexplicit |
Constructs the wrapped object and passes the embedded utils::ResourceScopeStorage to it as the first argument.
Definition at line 186 of file resource_scopes.hpp.
|
inline |
Definition at line 196 of file resource_scopes.hpp.
|
inlinenoexcept |
Returns the wrapped object.
Definition at line 199 of file resource_scopes.hpp.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 201 of file resource_scopes.hpp.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 206 of file resource_scopes.hpp.
|
inlinenoexcept |
Returns the wrapped object.
Definition at line 204 of file resource_scopes.hpp.