Loading...
Searching...
No Matches
 
 
 
 
 
    1#ifndef ENTT_CONFIG_CONFIG_H 
    2#define ENTT_CONFIG_CONFIG_H 
    8#if defined(__cpp_exceptions) && !defined(ENTT_NOEXCEPTION) 
   10#    define ENTT_THROW throw 
   12#    define ENTT_CATCH catch(...) 
   14#    define ENTT_CONSTEXPR constexpr  
   16#    define ENTT_TRY if(true) 
   17#    define ENTT_CATCH if(false) 
   20#if __has_include(<version>) 
   23#    if defined(__cpp_consteval) 
   24#        define ENTT_CONSTEVAL consteval 
   29#    define ENTT_CONSTEVAL constexpr 
   34#    define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type> 
   36#    define ENTT_MAYBE_ATOMIC(Type) Type 
   41#    define ENTT_ID_TYPE std::uint32_t 
   46#ifndef ENTT_SPARSE_PAGE 
   47#    define ENTT_SPARSE_PAGE 4096 
   50#ifndef ENTT_PACKED_PAGE 
   51#    define ENTT_PACKED_PAGE 1024 
   54#ifdef ENTT_DISABLE_ASSERT 
   56#    define ENTT_ASSERT(condition, msg) (void(0)) 
   57#elif !defined ENTT_ASSERT 
   59#    define ENTT_ASSERT(condition, msg) assert(((condition) && (msg))) 
   62#ifdef ENTT_DISABLE_ASSERT 
   63#    undef ENTT_ASSERT_CONSTEXPR 
   64#    define ENTT_ASSERT_CONSTEXPR(condition, msg) (void(0)) 
   65#elif !defined ENTT_ASSERT_CONSTEXPR 
   66#    define ENTT_ASSERT_CONSTEXPR(condition, msg) ENTT_ASSERT(condition, msg) 
   69#define ENTT_FAIL(msg) ENTT_ASSERT(false, msg); 
   72#    define ENTT_ETO_TYPE(Type) void 
   74#    define ENTT_ETO_TYPE(Type) Type 
   78#    define ENTT_STORAGE(Mixin, ...) __VA_ARGS__ 
   80#    define ENTT_STORAGE(Mixin, ...) Mixin<__VA_ARGS__> 
   83#ifdef ENTT_STANDARD_CPP 
   84#    define ENTT_NONSTD false 
   86#    define ENTT_NONSTD true 
   87#    if defined __clang__ || defined __GNUC__ 
   88#        define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__ 
   89#        define ENTT_PRETTY_FUNCTION_PREFIX '=' 
   90#        define ENTT_PRETTY_FUNCTION_SUFFIX ']' 
   91#    elif defined _MSC_VER 
   92#        define ENTT_PRETTY_FUNCTION __FUNCSIG__ 
   93#        define ENTT_PRETTY_FUNCTION_PREFIX '<' 
   94#        define ENTT_PRETTY_FUNCTION_SUFFIX '>' 
   99#    pragma detect_mismatch("entt.version", ENTT_VERSION) 
  100#    pragma detect_mismatch("entt.noexcept", ENTT_XSTR(ENTT_TRY)) 
  101#    pragma detect_mismatch("entt.id", ENTT_XSTR(ENTT_ID_TYPE)) 
  102#    pragma detect_mismatch("entt.nonstd", ENTT_XSTR(ENTT_NONSTD))