5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_OPTIONAL_OPTIONAL_RESETTER_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_OPTIONAL_OPTIONAL_RESETTER_HPP_
28template <
typename Value>
57 void dismiss() noexcept { op_ =
nullptr; }
auto operator=(optional_resetter &&) -> optional_resetter &=delete
Not movable.
optional_resetter(optional_resetter const &)=delete
Not copyable.
~optional_resetter()
Reset the optional if not dismissed.
Definition optional_resetter.hpp:50
auto operator=(optional_resetter const &) -> optional_resetter &=delete
Not copyable.
optional_resetter(optional_resetter &&)=delete
Not movable.
void dismiss() noexcept
Dismiss the resetter, so it no longer resets the optional in the destructor.
Definition optional_resetter.hpp:57
optional_resetter(optional< Value > &opt) noexcept
Construct an instance and specify the optional object to reset.
Definition optional_resetter.hpp:37
Implementation of std::optional for pre-C++17 compilers, and which replaces defined undefined behavio...
Definition optional.hpp:122
Definition accumulate.hpp:37
Definition accumulate.hpp:36