kaycxx-core
C++ core library
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
scope.hpp File Reference

Defines scope_exit, a small no-throw scope guard for running cleanup code when the current C++ scope exits. More...

#include <concepts>
#include <type_traits>
#include <utility>
Include dependency graph for scope.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kaycxx::core::scope_exit< F >
 Executes a callback when the current scope exits. More...
 

Namespaces

namespace  kaycxx
 Root namespace for kaycxx libraries.
 
namespace  kaycxx::core
 Core C++ functionality.
 

Functions

template<typename F >
 kaycxx::core::scope_exit (F) -> scope_exit< F >
 Deduction guide allowing scope_exit to be constructed directly from a callback without spelling out its type.
 

Detailed Description

Defines scope_exit, a small no-throw scope guard for running cleanup code when the current C++ scope exits.