5#ifndef ACCESSIBILITY_BASE_AUTO_RESET_H_
6#define ACCESSIBILITY_BASE_AUTO_RESET_H_
26 : scoped_variable_(scoped_variable),
28 std::exchange(*scoped_variable_,
std::forward<
U>(new_value))) {}
31 : scoped_variable_(
std::exchange(other.scoped_variable_, nullptr)),
32 original_value_(
std::move(other.original_value_)) {}
35 scoped_variable_ = std::exchange(rhs.scoped_variable_,
nullptr);
36 original_value_ = std::move(rhs.original_value_);
42 *scoped_variable_ = std::move(original_value_);
AutoReset(T *scoped_variable, U &&new_value)
AutoReset & operator=(AutoReset &&rhs)
AutoReset(AutoReset &&other)