std::experi...~scope_exit(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

Hii bestie πŸ’• welcome to the C++ Standard Libary corner of the group chat. This page is literally about std::experimental::scope_exit::~scope_exit β€” the destructor for std::experimental::scope_exit, no cap. It’s giving β€œcleanup crew has entered the chat” energy ✨.

✨ Synopsis ✨

~scope_exit() noexcept;  (library fundamentals TS v3)

So this destructor is noexcept, bestie 🫢 β€” and it’s a library fundamentals TS v3 situation. When it runs, it calls the exit function if the scope_exit is active, then destroys the stored EF (if it is a function object) and any other non-static data members. That’s the whole vibe check: exit function first if active, then stored EF (if it’s a function object) and any other non-static data members get destroyed. πŸ’…

πŸ‘€ See also πŸ‘€

  • release β€” makes the scope_exit inactive (public member function)

Sourced from http://cppreference.com πŸ’–, version/date 2024.06.10, and filed under std::experi...~scope_exit(3). Byeee, stay slaying those destructors πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from