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

Go to the source code of this file.

Macros

#define PREPROCESSOR_TO_TEXT(x)
 
#define MACRO_OVERLOAD(prefix, ...)
 Implement preprocessor function overloading based on argument count for a set of macros following a distinct convention. Individual overloads must have a trailing number corresponding to the number of arguments they accept.
 

Detailed Description

Author
David Mórász
Date
2025

Definition in file Macros.h.

Macro Definition Documentation

◆ MACRO_OVERLOAD

#define MACRO_OVERLOAD ( prefix,
... )
Value:
PREPROCESSOR_APPEND_VA_ARG_COUNT(prefix, __VA_ARGS__)(__VA_ARGS__)

Implement preprocessor function overloading based on argument count for a set of macros following a distinct convention. Individual overloads must have a trailing number corresponding to the number of arguments they accept.

For example:

#define FOO_3(a, b, c) a##b##c
#define FOO_2(a, b) a##b
#define FOO_1(a) a
#define FOO(...) MACRO_OVERLOAD(FOO_, __VA_ARGS__)
FOO(1) // -> 1
FOO(1, 2) // -> 12
FOO(1, 2, 3) // -> 123

Definition at line 38 of file Macros.h.

◆ PREPROCESSOR_TO_TEXT

#define PREPROCESSOR_TO_TEXT ( x)
Value:
TEXT(PREPROCESSOR_TO_STRING(x))

Definition at line 18 of file Macros.h.