MT Core (C++)
Core library for replacing C++ standard in project usage
|
#include <cerrno>
#include <cpptrace/cpptrace.hpp>
#include <cstdarg>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
Go to the source code of this file.
Classes | |
struct | mtcore::overload< Ts > |
Visit overload pattern for std::variant. More... | |
Namespaces | |
namespace | mtcore |
Core library for C++ with Zig-related functionality. | |
Macros | |
#define | MTCORE_CORE_HPP |
#define | EXIT_MAX 255 |
Maximum exit code value. | |
#define | EXIT_ABORT EXIT_MAX |
Exit code value to indicate program was aborted due to invalid state (e.g. | |
#define | mt_print_cur_stacktrace(...) |
Prints the current stack trace with an optional message. | |
#define | mt_print_stacktrace(TRACE, ...) |
Prints a specific stack trace with an optional message. | |
#define | not_implemented() |
Stub for code that's not implemented Will crash the program if reached in debug mode Will stop compilation if in release mode. | |
#define | print_debug(fmt, ...) |
Prints a debug message when in debug mode. | |
#define | ensure(check, ...) |
Ensures that a check holds true, aborts the program if not true Will print error if the condition is false. | |
#define | unreachable(...) |
Marks code as unreachable. | |
#define | mtcore_warn_trace(...) |
Prints a warning message in debug builds Does nothing in release builds`. | |
#define | mtcore_warn(...) |
Prints a warning message and stacktrace in debug builds Does nothing in release builds`. | |
#define | DEFER_(LINE) |
#define | DEFER(LINE) |
#define | mtdefer auto DEFER(__LINE__) = mtcore::defer_impl::DeferrerBuilder{} + [&]() |
Defer statement that will mtdefer execution until the scope is left, at which point the code will run Execution will happen regardless of whether there was an error. | |
Typedefs | |
using | Environ = const char ** |
Environment variable typedef. | |
typedef float | f32 |
Alias for 32-bit floats. | |
typedef double | f64 |
Alias for 64-bit floats. | |
typedef long double | f80 |
Alias for 80-bit floats. | |
typedef int8_t | i8 |
Alias for 8-bit ints. | |
typedef int16_t | i16 |
Alias for 16-bit ints. | |
typedef int32_t | i32 |
Alias for 32-bit ints. | |
typedef int64_t | i64 |
Alias for 64-bit ints. | |
typedef uint8_t | u8 |
Alias for 8-bit unsigned ints. | |
typedef uint16_t | u16 |
Alias for 16-bit unsigned ints. | |
typedef uint32_t | u32 |
Alias for 32-bit unsigned ints. | |
typedef uint64_t | u64 |
Alias for 64-bit unsigned ints. | |
typedef uintptr_t | uptr |
Alias for ints the same size as a pointer. | |
typedef wchar_t | wchar |
Alias for ints the same size as a wide character. | |
typedef int | ThreeWayCompare |
Enumerations | |
enum class | mtcore::CollectionAddNoAllocationError { mtcore::CollectionAddNoAllocationError::NO_ROOM } |
Errors when adding elements to collections when no allocation is allowed. More... | |
Functions | |
template<class... Ts> | |
mtcore::overload (Ts...) -> overload< Ts... > | |
#define DEFER | ( | LINE | ) |
Definition at line 340 of file core/mtcore/core.hpp.
#define DEFER_ | ( | LINE | ) |
Definition at line 339 of file core/mtcore/core.hpp.
#define MTCORE_CORE_HPP |
Definition at line 32 of file core/mtcore/core.hpp.
#define mtcore_warn | ( | ... | ) |
Prints a warning message and stacktrace in debug builds Does nothing in release builds`.
Definition at line 271 of file core/mtcore/core.hpp.
#define mtcore_warn_trace | ( | ... | ) |
Prints a warning message in debug builds Does nothing in release builds`.
Definition at line 262 of file core/mtcore/core.hpp.
#define not_implemented | ( | ) |
Stub for code that's not implemented Will crash the program if reached in debug mode Will stop compilation if in release mode.
Definition at line 180 of file core/mtcore/core.hpp.
#define print_debug | ( | fmt, | |
... ) |
Prints a debug message when in debug mode.
Does nothing in release mode
fmt | C Format string for printing a debug message |
Definition at line 199 of file core/mtcore/core.hpp.
using Environ = const char ** |
Environment variable typedef.
Definition at line 51 of file core/mtcore/core.hpp.
typedef int ThreeWayCompare |
Definition at line 137 of file core/mtcore/core.hpp.