Constructors
Synopses
Declared in <absl/base/no_destructor.h>
Deleted: NoDestructor is not copyable.
NoDestructor(NoDestructor const& other) = delete;
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);
Forwards move construction for T.
constexpr
explicit
NoDestructor(T&& x);
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);
Parameters
Name |
Description |
x |
The value to copy‐construct the wrapped |
args |
The arguments forwarded to |
Created with MrDocs