|
qxLib
|
#include <qx/containers/string/string_setup.h>#include <qx/meta/qualifiers.h>#include <qx/macros/common.inl>Go to the source code of this file.
Macros | |
| #define | QX_UNUSED(...) ((void)sizeof(__VA_ARGS__)) |
| Suppress unused variable warnings. More... | |
| #define | QX_EMPTY_MACRO static_assert(true) |
| Placeholder for disabled macros. More... | |
| #define | QX_JOIN(symbol1, symbol2) _QX_DO_JOIN(symbol1, symbol2) |
| Concatenates two preprocessor tokens, performing macro expansion on them first. | |
| #define | QX_LINE int(QX_JOIN(__LINE__, U)) |
| Same as LINE, but fixes some problems when using it in constexpr context. | |
| #define | QX_SHORT_FILE qx::details::last_slash(QXT(__FILE__)) |
| Cuts full absolute path to the file name only ex: "C:\folder1\folder2\file.h" => "file.h". | |
| #define | QX_CONST_CAST_THIS() const_cast<qx::switch_const_t<std::remove_pointer_t<decltype(this)>>*>(this) |
| This macro is made for situations where you have a const method, and you need exactly the same method but non-const. More... | |
| #define | QX_CALL_BEFORE_MAIN inline volatile qx::details::call_before_main_invoker QX_LINE_NAME(_stubCallBeforeMain) |
| Calls this lambda before the main invocation. More... | |
| #define | QX_DISABLE_OPTIMIZATIONS() _QX_DISABLE_OPTIMIZATIONS() |
| Start a block with compiling optimisations disabled. Must be outside of functions and have an appropriate QX_ENABLE_OPTIMIZATIONS(). | |
| #define | QX_ENABLE_OPTIMIZATIONS() _QX_ENABLE_OPTIMIZATIONS() |
| End a block with compiling optimisations disabled. | |
| #define | QX_FORCE_INLINE _QX_FORCE_INLINE |
| Make this function forcefully inlined (except for QX_DEBUG build) | |
| #define | QX_APPEND_VA_ARG_COUNT(prefix, ...) _QX_APPEND_VA_ARG_COUNT(prefix, ##__VA_ARGS__) |
| Add VA_ARGS count to the preprocessor prefix. More... | |
| #define | QX_VA_ARG_COUNT(...) QX_APPEND_VA_ARG_COUNT(, ##__VA_ARGS__) |
| Get number of va args. More... | |
| #define | QX_EXPAND(x) x |
| Forces an extra macro expansion step so that a macro result is fully resolved before being used as a function-like macro. | |
| #define QX_APPEND_VA_ARG_COUNT | ( | prefix, | |
| ... | |||
| ) | _QX_APPEND_VA_ARG_COUNT(prefix, ##__VA_ARGS__) |
Add VA_ARGS count to the preprocessor prefix.
It supports up to 32 arguments, ranging from 0 (empty parentheses).
| prefix | - preprocessor prefix |
| ... | - va args to count QX_APPEND_VA_ARG_COUNT(foo_, 1, 1, 1); // -> foo_3
#define QX_APPEND_VA_ARG_COUNT(prefix,...) Add VA_ARGS count to the preprocessor prefix. Definition: common.h:103 |
| #define QX_CALL_BEFORE_MAIN inline volatile qx::details::call_before_main_invoker QX_LINE_NAME(_stubCallBeforeMain) |
Calls this lambda before the main invocation.
| #define QX_CONST_CAST_THIS | ( | ) | const_cast<qx::switch_const_t<std::remove_pointer_t<decltype(this)>>*>(this) |
This macro is made for situations where you have a const method, and you need exactly the same method but non-const.
| #define QX_EMPTY_MACRO static_assert(true) |
| #define QX_UNUSED | ( | ... | ) | ((void)sizeof(__VA_ARGS__)) |
| #define QX_VA_ARG_COUNT | ( | ... | ) | QX_APPEND_VA_ARG_COUNT(, ##__VA_ARGS__) |
Get number of va args.
It supports up to 32 arguments, ranging from 0 (empty parentheses).
| ... | - va args to count QX_VA_ARG_COUNT(1, 1, 1); // -> 3
|