diff --git a/Sdk/External/HopscotchMap/hopscotch_growth_policy.h b/Sdk/External/HopscotchMap/hopscotch_growth_policy.h index 0e46386..226b2d9 100644 --- a/Sdk/External/HopscotchMap/hopscotch_growth_policy.h +++ b/Sdk/External/HopscotchMap/hopscotch_growth_policy.h @@ -57,15 +57,15 @@ #define TSL_HH_THROW_OR_TERMINATE(ex, msg) throw ex(msg) #else #define TSL_HH_NO_EXCEPTIONS -#ifdef NDEBUG -#define TSL_HH_THROW_OR_TERMINATE(ex, msg) std::terminate() -#else +#ifdef TSL_DEBUG #include #define TSL_HH_THROW_OR_TERMINATE(ex, msg) \ do { \ std::cerr << msg << std::endl; \ std::terminate(); \ } while (0) +#else +#define TSL_HH_THROW_OR_TERMINATE(ex, msg) std::terminate() #endif #endif diff --git a/Sdk/External/HopscotchMap/hopscotch_hash.h b/Sdk/External/HopscotchMap/hopscotch_hash.h index ad4f58e..6611ff9 100644 --- a/Sdk/External/HopscotchMap/hopscotch_hash.h +++ b/Sdk/External/HopscotchMap/hopscotch_hash.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -309,12 +310,22 @@ class hopscotch_bucket : public hopscotch_bucket_hash { value_type& value() noexcept { tsl_hh_assert(!empty()); +#if defined(__cplusplus) && __cplusplus >= 201703L + return *std::launder( + reinterpret_cast(std::addressof(m_value))); +#else return *reinterpret_cast(std::addressof(m_value)); +#endif } const value_type& value() const noexcept { tsl_hh_assert(!empty()); +#if defined(__cplusplus) && __cplusplus >= 201703L + return *std::launder( + reinterpret_cast(std::addressof(m_value))); +#else return *reinterpret_cast(std::addressof(m_value)); +#endif } template diff --git a/Sdk/Include/Core/Public/DataTypes.h b/Sdk/Include/Core/Public/DataTypes.h index 1f5b91d..f0b0d0f 100644 --- a/Sdk/Include/Core/Public/DataTypes.h +++ b/Sdk/Include/Core/Public/DataTypes.h @@ -5,6 +5,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////////////// // Basic game data types and macros