# Juliet\include\Core\Common\CoreUtils

## Source Files
- Header: `Juliet\include\Core\Common\CoreUtils.h`
- Source: `Juliet\src\Core\Common\CoreUtils.cpp`

## AI Description
This C++ component provides a collection of utility functions and macros designed to enhance the robustness, performance, and debugging capabilities of applications. The primary purpose is to simplify common tasks such as stringification, pragma handling, assertion checks, memory management, and more.

The design includes several key features:

1. **Stringify Helpers**: Macros like `JULIET_STR` and `JULIET_TOSTRING` are used to convert C++ literals into strings at compile time, which is particularly useful for logging and debugging purposes.

2. **Pragma Operator**: The `JULIET_PRAGMA` macro allows for conditional compilation based on the compiler being used. This includes suppressing warnings and errors specific to MSVC and Clang compilers.

3. **Agnostic "Push/Pop"**: The `JULIET_WARNING_PUSH` and `JULIET_WARNING_POP` macros are used to manage compiler warnings during macro expansion, ensuring that only the necessary warnings are suppressed.

4. **Assert Macros**: The `Assert`, `AssertHR`, and `Unimplemented` macros provide a consistent way to assert conditions in the code. They include additional information such as the source location and handle result for better debugging.

5. **Zeroing Functions**: The `ZeroStruct`, `ZeroArray`, and `ZeroDynArray` functions are used to zero out memory, ensuring that any uninitialized data is properly cleaned up.

6. **Deferred Function Handling**: The `DeferredFunction` class allows for deferred execution of functions, which can be useful in scenarios where the function needs to be executed after a certain condition is met.

7. **Alignment and Swap Functions**: The `AlignPow2`, `Swap`, and `AlignOf` macros provide utilities for aligning memory addresses and swapping values between variables.

8. **Compiler Detection**: The `COMPILER_CLANG` and `COMPILER_MSVC` macros are used to detect the compiler being used, allowing for conditional compilation based on the specific compiler features available.

9. **Memory Management**: The `Free` function ensures that a `ByteBuffer` is properly deallocated, freeing up memory resources.

This component aims to provide a comprehensive set of tools for developers to enhance their code quality and performance, while maintaining a clean and maintainable structure.

## Symbols

### Namespace `Juliet`

#### Classes, Structs & Unions
- `class DeferredFunction`
- `class Function`

#### Functions & Methods
- `\
    while (0)

#else
#define Assert(...) ((void)0)
#define AssertHR(hr_expression, message) ((void)(hr_expression))
#define Unimplemented() ((void)0)
#endif

    JULIET_API extern void JulietAssert(const char* expression, const char* message,
                                        std::source_location location = std::source_location::current(), long handleResult = 0)`
- `DeferredFunction::DeferredFunction(const DeferredFunction&)`
- `DeferredFunction::DeferredFunction(const DeferredFunction&&)`
- `extern JULIET_API void Free(ByteBuffer& buffer)`

