MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Finally.h File Reference
#include "CoreMinimal.h"

Go to the source code of this file.

Data Structures

struct  Mcro::Finally::FFinally
 Run arbitrary finalizers on destruction. It has similar purpose to ON_SCOPE_EXIT, however FFinally can be moved around into different scopes, Payload will be only executed if the finalizer hasn't been moved from, otherwise the payload will be ignored in the source of move assignments. More...
 
struct  Mcro::Finally::FFinallySyntaxSupport
 

Namespaces

namespace  Mcro
 
namespace  Mcro::Finally
 

Macros

#define FINALLY(...)
 

Detailed Description

Author
David Mórász
Date
2025

Definition in file Finally.h.

Macro Definition Documentation

◆ FINALLY

#define FINALLY ( ...)
Value:

A more convenient way to use FFinally.

auto fin = FINALLY(=, this) mutable
{
...
};
AsyncTask(ENamedThreads::GameThread, [fin = MoveTemp(fin)]
{
// Payload is executed at the end of this scope
}
#define FINALLY(...)
Definition Finally.h:96

Definition at line 96 of file Finally.h.