Create 1.5.1 branch
This commit is contained in:
parent
31625f7466
commit
b31a72c7ad
|
@ -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 <iostream>
|
||||
#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
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <stdexcept>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
@ -309,12 +310,22 @@ class hopscotch_bucket : public hopscotch_bucket_hash<StoreHash> {
|
|||
|
||||
value_type& value() noexcept {
|
||||
tsl_hh_assert(!empty());
|
||||
#if defined(__cplusplus) && __cplusplus >= 201703L
|
||||
return *std::launder(
|
||||
reinterpret_cast<value_type*>(std::addressof(m_value)));
|
||||
#else
|
||||
return *reinterpret_cast<value_type*>(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<const value_type*>(std::addressof(m_value)));
|
||||
#else
|
||||
return *reinterpret_cast<const value_type*>(std::addressof(m_value));
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <array>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Basic game data types and macros
|
||||
|
|
Loading…
Reference in New Issue