27 : detach (
std::move (d)) {}
A ScopeGuard that uses a std::function internally to allow type erasure.
ErasedScopeGuard()=default
Constructs an ErasedScopeGuard with no callback.
void release()
Resets this instance to its default state without calling the stored callback.
ErasedScopeGuard & operator=(ErasedScopeGuard &&other) noexcept
Calls the stored callback, if any, then assumes responsibility for calling other's callback.
~ErasedScopeGuard() noexcept
Destructor, calls the callback assigned to this ScopeGuard.
void reset()
Calls the stored callback, if any, then resets this instance to its default state.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...