Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ScopeExit.h File Reference

Go to the source code of this file.

Classes

class  ScopeExit< F >
 Class that calls a function when it goes out of scope. More...
 

Macros

#define JPH_SCOPE_EXIT_TAG2(line)   scope_exit##line
 
#define JPH_SCOPE_EXIT_TAG(line)   JPH_SCOPE_EXIT_TAG2(line)
 
#define JPH_SCOPE_EXIT(...)   ScopeExit JPH_SCOPE_EXIT_TAG(__LINE__)(__VA_ARGS__)
 Usage: JPH_SCOPE_EXIT([]{ code to call on scope exit });.
 

Macro Definition Documentation

◆ JPH_SCOPE_EXIT

#define JPH_SCOPE_EXIT (   ...)    ScopeExit JPH_SCOPE_EXIT_TAG(__LINE__)(__VA_ARGS__)

Usage: JPH_SCOPE_EXIT([]{ code to call on scope exit });.

◆ JPH_SCOPE_EXIT_TAG

#define JPH_SCOPE_EXIT_TAG (   line)    JPH_SCOPE_EXIT_TAG2(line)

◆ JPH_SCOPE_EXIT_TAG2

#define JPH_SCOPE_EXIT_TAG2 (   line)    scope_exit##line