Defines#

group defines

This module provides a collection of macro definitions for things like compiler-specific attributes, feature inclusion, and warning suppression.

Defines

HYPERION_STD_LIB_HAS_EXPERIMENTAL_SOURCE_LOCATION#

Whether Hyperion will use std::experimental::source_location if <source_location> is not yet available for the given compiler. This defaults to true when using libstdc++ (gcc’s std lib). To disable it, define it to false prior to including any Hyperion headers.

HYPERION_STD_LIB_HAS_SOURCE_LOCATION#

if <source_location> is available, this will be defined as true, otherwise it will be false. If this is false, std::source_location may be aliased as std::experimental::source_location if HYPERION_STD_LIB_HAS_EXPERIMENTAL_SOURCE_LOCATION is true, otherwise, features relying on std::source_location will revert to macros using __FILE__ and __LINE__ instead

HYPERION_STD_LIB_HAS_JTHREAD#

if std::jthread is available, this will be defined as true, otherwise it will be false.

HYPERION_PLATFORM_STD_LIB_HAS_COMPARE#

Used to check if the compiled-against standard library supports #include <compare> ahref=”https://en.cppreference.com/w/cpp/feature_test”>__cpp_concepts</a>

HYPERION_COMPILER_HAS_TYPE_PACK_ELEMENT#

Indicates whether the compiler builtin __type_pack_element is available (used for efficient type parameter pack indexing in mpl)

HYPERION_PLATFORM_COMPILER_SUPPORTS_CONDITIONALLY_TRIVIAL_SMFS#

Used to check if the current compiler supports conditionally trivial special member functions ahref=”https://en.cppreference.com/w/cpp/feature_test”>__cpp_concepts</a>

HYPERION_NO_UNIQUE_ADDRESS#

Platform-dependent, conditional [[no_unique_address]] to account for:

  1. MSVC dragging their feet on providing an actual implementation

  2. Clang not supporting it on Windows because of MSVC’s lack of support

HYPERION_TRIVIAL_ABI#

Use to apply clang’s trivial_abi attribute to the following class/struct declaration when compiling with clang. On other compilers this macro is empty.

HYPERION_NO_DESTROY#

Use to apply clang’s no_destroy attribute to the following variable declaration when compiling with clang. On other compilers this macro is empty.

HYPERION_CONSTEXPR_STRINGS#

Conditionally marks a function or variable constexpr if constexpr std::string has been implemented for the compiler/standard library implementation being compiled with.

HYPERION_UNREACHABLE()#

Marks the containing control flow branch as unreachable. On GCC/Clang, this will use __builtin_unreachable(), on MSVC __assume(false)

HYPERION_IGNORE_SUGGEST_DESTRUCTOR_OVERRIDE_WARNING_START#

Use to temporarily disable warnings for destructors that override but are not marked override (-Wsuggest-destructor-override). Make sure to pair with HYPERION_IGNORE_SUGGEST_DESTRUCTOR_OVERRIDE_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_SUGGEST_DESTRUCTOR_OVERRIDE_WARNING_STOP#

Use to re-enable warnings for destructors that override but are not marked override

HYPERION_IGNORE_SWITCH_MISSING_ENUM_VALUES_WARNING_START#

Use to temporarily disable warnings for switches that don’t cover all enum values of the enum being “switched” on (-Wswitch-enum). Make sure to pair with HYPERION_IGNORE_SWITCH_MISSING_ENUM_VALUES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_SWITCH_MISSING_ENUM_VALUES_WARNING_STOP#

Use to re-enable warnings for switches that don’t cover all enum values of the enum being “switched” on (-Wswitch-enum)

HYPERION_IGNORE_OLD_STYLE_CASTS_WARNING_START#

Use to temporarily disable warnings for c-style casts (-Wold-style-cast). Make sure to pair with HYPERION_IGNORE_OLD_STYLE_CASTS_WARNING_START to properly scope the area where the warning is ignored.

HYPERION_IGNORE_OLD_STYLE_CASTS_WARNING_STOP#

Use to re-enable warnings for c-style casts.

HYPERION_IGNORE_INVALID_NORETURN_WARNING_START#

Use to temporarily disable warnings for functions marked [[noreturn]] that may return (-Winvalid-noreturn). Make sure to pair with HYPERION_IGNORE_INVALID_NORETURN_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_INVALID_NORETURN_WARNING_STOP#

Use to re-enable warnings for for functions marked [[noreturn]] that may return HYPERION_IGNORE_INVALID_NORETURN_WARNING_START

HYPERION_IGNORE_DEPRECATED_DECLARATIONS_WARNING_START#

Use to temporarily disable warnings for using deprecated declarations (-Wdeprecated-declarations). Make sure to pair with HYPERION_IGNORE_DEPRECATED_DECLARATIONS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_DEPRECATED_DECLARATIONS_WARNING_STOP#

Use to re-enable warnings for using deprecated declarations after having previously used HYPERION_IGNORE_DEPRECATED_DECLARATIONS_WARNING_START

HYPERION_IGNORE_UNINITIALIZED_VARIABLES_WARNING_START#

Use to temporarily disable warnings for using uninitialized variables (-Wuninitialized). Make sure to pair with HYPERION_IGNORE_UNINITIALIZED_VARIABLES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNINITIALIZED_VARIABLES_WARNING_STOP#

Use to re-enable warnings for using uninitialized variables after having previously used HYPERION_IGNORE_UNINITIALIZED_VARIABLES_WARNING_START

HYPERION_IGNORE_UNNEEDED_INTERNAL_DECL_WARNING_START#

Use to temporarily disable warnings for unneeded internal declarations (-Wunneeded-internal-declaration). Make sure to pair with HYPERION_IGNORE_UNNEEDED_INTERNAL_DECL_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNNEEDED_INTERNAL_DECL_WARNING_STOP#

Use to re-enable warnings for unneeded internal declarations after having previously used HYPERION_IGNORE_UNNEEDED_INTERNAL_DECL_WARNING_START

HYPERION_IGNORE_CONSTANT_CONDITIONAL_EXPRESSIONS_WARNING_START#

Use to temporarily disable warnings for constant conditional expressions in non-constexpr if (MSVC 4127). Make sure to pair with HYPERION_IGNORE_CONSTANT_CONDITIONAL_EXPRESSIONS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_CONSTANT_CONDITIONAL_EXPRESSIONS_WARNING_STOP#

Use to re-enable warnings for constant conditional expressions after having previously used HYPERION_IGNORE_CONSTANT_CONDITIONAL_EXPRESSIONS_WARNING_STOP

HYPERION_IGNORE_MARKED_NOEXCEPT_BUT_THROWS_WARNING_START#

Use to temporarily disable warnings for functions marked noexcept that intentionally throw (MSVC 4297). Make sure to pair with HYPERION_IGNORE_MARKED_NOEXCEPT_BUT_THROWS_WARNING_STOP to properly scope the area where the warning is ignored.

Note

Using this makes sense if it’s used to suppress warnings when throwing is intentionally used as a way to force compiler errors in constexpr functions

HYPERION_IGNORE_MARKED_NOEXCEPT_BUT_THROWS_WARNING_STOP#

Use to re-enable warnings for functions marked noexcept that intentionally throw after having previously used HYPERION_IGNORE_MARKED_NOEXCEPT_BUT_THROWS_WARNING_START

HYPERION_IGNORE_UNUSED_VALUES_WARNING_START#

Use to temporarily disable warnings for unused variables Make sure to pair with HYPERION_IGNORE_UNUSED_VALUES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_VALUES_WARNING_STOP#

Use to re-enable warnings for unused variables after having previously used HYPERION_IGNORE_UNUSED_VALUES_WARNING_START

HYPERION_IGNORE_UNUSED_VARIABLES_WARNING_START#

Use to temporarily disable warnings for unused variables Make sure to pair with HYPERION_IGNORE_UNUSED_VARIABLES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_VARIABLES_WARNING_STOP#

Use to re-enable warnings for unused variables after having previously used HYPERION_IGNORE_UNUSED_VARIABLES_WARNING_START

HYPERION_IGNORE_MISSING_NORETURN_WARNING_START#

Use to temporarily disable warnings for noreturn functions missing a noreturn attribute Make sure to pair with HYPERION_IGNORE_MISSING_NORETURN_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_MISSING_NORETURN_WARNING_STOP#

Use to re-enable warnings for noreturn functions missing a noreturn attribute after having previously used HYPERION_IGNORE_MISSING_NORETURN_WARNING_START

HYPERION_IGNORE_RESERVED_IDENTIFIERS_WARNING_START#

Use to temporarily disable warnings using reserved identifiers. Make sure to pair with HYPERION_IGNORE_RESERVED_IDENTIFIERS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_RESERVED_IDENTIFIERS_WARNING_STOP#

Use to re-enable warnings for using reserved identifiers after having previously used HYPERION_IGNORE_RESERVED_IDENTIFIERS_WARNING_START

HYPERION_IGNORE_RESERVED_MACRO_IDENTIFIERS_WARNING_START#

Use to temporarily disable warnings using reserved macro identifiers. Make sure to pair with HYPERION_IGNORE_RESERVED_MACRO_IDENTIFIERS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_RESERVED_MACRO_IDENTIFIERS_WARNING_STOP#

Use to re-enable warnings for using reserved macro identifiers after having previously used HYPERION_IGNORE_RESERVED_MACRO_IDENTIFIERS_WARNING_START

HYPERION_IGNORE_PADDING_WARNING_START#

Use to temporarily disable warnings for class/struct definitions requiring padding. Make sure to pair with HYPERION_IGNORE_PADDING_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_PADDING_WARNING_STOP#

Use to re-enable warnings for class/struct definitions requiring padding after having previously used HYPERION_IGNORE_PADDING_WARNING_START

HYPERION_IGNORE_WEAK_VTABLES_WARNING_START#

Use to temporarily disable warnings for virtual classes with weak vtables. Make sure to pair with HYPERION_IGNORE_WEAK_VTABLES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_WEAK_VTABLES_WARNING_STOP#

Use to re-enable warnings for virtual classes with weak vtables after having previously used HYPERION_IGNORE_WEAK_VTABLES_WARNING_START

HYPERION_IGNORE_UNUSED_TEMPLATES_WARNING_START#

Use to temporarily disable warnings for unused function templates Make sure to pair with HYPERION_IGNORE_UNUSED_TEMPLATES_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_TEMPLATES_WARNING_STOP#

Use to re-enable warnings for unused function templates after having previously used HYPERION_IGNORE_UNUSED_TEMPLATES_WARNING_START

HYPERION_IGNORE_UNUSED_FUNCTIONS_WARNING_START#

Use to temporarily disable warnings for unused functions Make sure to pair with HYPERION_IGNORE_UNUSED_FUNCTIONS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_FUNCTIONS_WARNING_STOP#

Use to re-enable warnings for unused functions after having previously used HYPERION_IGNORE_UNUSED_FUNCTIONS_WARNING_START

HYPERION_IGNORE_UNUSED_MEMBER_FUNCTIONS_WARNING_START#

Use to temporarily disable warnings for unused member functions Make sure to pair with HYPERION_IGNORE_UNUSED_MEMBER_FUNCTIONS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_MEMBER_FUNCTIONS_WARNING_STOP#

Use to re-enable warnings for unused member functions after having previously used HYPERION_IGNORE_UNUSED_MEMBER_FUNCTIONS_WARNING_START

HYPERION_IGNORE_SIGNED_BITFIELD_WARNING_START#

Use to temporarily disable warnings for enums with signed underlying type used as bitfields Make sure to pair with HYPERION_IGNORE_SIGNED_BITFIELD_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_SIGNED_BITFIELD_WARNING_STOP#

Use to re-enable warnings for enums with signed underlying type used as bitfields after having previously used HYPERION_IGNORE_SIGNED_BITFIELD_WARNING_START

HYPERION_IGNORE_UNKNOWN_DOC_COMMAND_WARNING_START#

Use to temporarily disable warnings unknown documentation commands Make sure to pair with HYPERION_IGNORE_UNKNOWN_DOC_COMMAND_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNKNOWN_DOC_COMMAND_WARNING_STOP#

Use to re-enable warnings for unknown documentation commands after having previously used HYPERION_IGNORE_UNKNOWN_DOC_COMMAND_WARNING_START

HYPERION_IGNORE_DOCUMENTATION_WARNING_START#

Use to temporarily disable warnings about documentation (for example, using a tparam directive in a non-template) Make sure to pair with HYPERION_IGNORE_DOCUMENTATION_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_DOCUMENTATION_WARNING_STOP#

Use to re-enable warnings about documentation (for example, using a tparam directive in a non-template) after having previously used HYPERION_IGNORE_DOCUMENTATION_WARNING_START

HYPERION_IGNORE_CONSTRUCTOR_SHADOW_FIELDS_WARNING_START#

Use to temporarily disable warnings for constructor parameters that shadow class/struct members Make sure to pair with HYPERION_IGNORE_CONSTRUCTOR_SHADOW_FIELDS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_CONSTRUCTOR_SHADOW_FIELDS_WARNING_STOP#

Use to re-enable warnings for constructor parameters that shadow class/struct members after having previously used HYPERION_IGNORE_CONSTRUCTOR_SHADOW_FIELDS_WARNING_STOP

HYPERION_IGNORE_FLOAT_EQUALITY_WARNING_START#

Use to temporarily disable warnings for checking for floating point equality Make sure to pair with HYPERION_IGNORE_FLOAT_EQUALITY_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_FLOAT_EQUALITY_WARNING_STOP#

Use to re-enable warnings for checking for floating point equality after having previously used HYPERION_IGNORE_FLOAT_EQUALITY_WARNING_STOP

HYPERION_IGNORE_COMMA_MISUSE_WARNING_START#

Use to temporarily disable warnings for comma operator misuse Make sure to pair with HYPERION_IGNORE_COMMA_MISUSE_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_COMMA_MISUSE_WARNING_STOP#

Use to re-enable warnings for comma operator misuse after having previously used HYPERION_IGNORE_COMMA_MISUSE_WARNING_START

HYPERION_IGNORE_UNSAFE_BUFFER_WARNING_START#

Use to disable warnings for usage of raw pointers for buffers (clang’s ‘-Wunsafe-buffer-usage`)

HYPERION_IGNORE_UNSAFE_BUFFER_WARNING_STOP#

Use to re-enable warnings for usage of raw pointers for buffers (clang’s ‘-Wunsafe-buffer-usage`)

HYPERION_PLATFORM_PROFILING_ENABLED#

Indicates whether Tracy profiling is enabled for this build.

HYPERION_PROFILE_FUNCTION()#

Profiles the containing scope with Tracy in builds where Tracy profiling is enabled.

HYPERION_PROFILE_START_FRAME(name)#

Starts a profiling frame with the given name with Tracy in builds where Tracy profiling is enabled.

HYPERION_PROFILE_END_FRAME(name)#

Ends the profiling frame with the given name with Tracy in builds where Tracy profiling is enabled.

HYPERION_PROFILE_MARK_FRAME()#

Marks the end of a profiling frame with Tracy in builds where Tracy profiling is enabled.

HYPERION_IGNORE_UNUSED_MACROS_WARNING_START#

Use to temporarily disable warnings for unused macros. Make sure to pair with HYPERION_IGNORE_UNUSED_MACROS_WARNING_STOP to properly scope the area where the warning is ignored.

HYPERION_IGNORE_UNUSED_MACROS_WARNING_STOP#

Use to re-enable warnings for unused macros after having previously used HYPERION_IGNORE_UNUSED_MACROS_WARNING_START