|
|
| scope_exit (const scope_exit &)=delete |
|
void | operator= (const scope_exit &)=delete |
|
scope_exit & | operator= (scope_exit &&)=delete |
|
|
std::function< void(void)> | exit_function |
|
bool | execute_on_destruction |
◆ scope_exit() [1/2]
| CPPHTTPLIB_NAMESPACE::detail::scope_exit::scope_exit |
( |
std::function< void(void)> && | f | ) |
|
|
inlineexplicit |
281977 : exit_function(std::move(f)), execute_on_destruction{true} {}
◆ scope_exit() [2/2]
| CPPHTTPLIB_NAMESPACE::detail::scope_exit::scope_exit |
( |
scope_exit && | rhs | ) |
|
|
inlinenoexcept |
281980 : exit_function(std::move(rhs.exit_function)),
281981 execute_on_destruction{rhs.execute_on_destruction} {
281982 rhs.release();
281983 }
◆ ~scope_exit()
| CPPHTTPLIB_NAMESPACE::detail::scope_exit::~scope_exit |
( |
| ) |
|
|
inline |
281985 {
281986 if (execute_on_destruction) { this->exit_function(); }
281987 }
◆ release()
| void CPPHTTPLIB_NAMESPACE::detail::scope_exit::release |
( |
| ) |
|
|
inline |
281989{ this->execute_on_destruction = false; }
The documentation for this struct was generated from the following file: