Constructors
Declared in <absl/base/no_destructor.h>
Deleted: NoDestructor is not copyable.
NoDestructor(NoDestructor const& other) = delete;
» more...
Forwards copy construction for T. Enables usage like this: static NoDestructor<std::array<string, 3>> x{{{"1", "2", "3"}}}; static NoDestructor<std::vector<int>> x{{1, 2, 3}};
constexpr
explicit
NoDestructor(T const& x);
» more...
Forwards move construction for T.
constexpr
explicit
NoDestructor(T&& x);
» more...
Forwards arguments to the T's constructor: calls T(args...).
template<typename... Ts>
requires !std::is_same_v<void(std::decay_t<Ts>&...),
void(NoDestructor&)>
constexpr
explicit
NoDestructor(Ts&&... args);
» more...
| Name | Description |
|---|---|
| x | The value to copy-construct the wrapped T from. |
| args | The arguments forwarded to T's constructor. |