Loading...
Searching...
No Matches
1#ifndef ENTT_CONFIG_CONFIG_H
2#define ENTT_CONFIG_CONFIG_H
6#if defined(__cpp_exceptions) && !defined(ENTT_NOEXCEPTION)
8# define ENTT_THROW throw
10# define ENTT_CATCH catch(...)
12# define ENTT_CONSTEXPR constexpr
14# define ENTT_TRY if(true)
15# define ENTT_CATCH if(false)
20# define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
22# define ENTT_MAYBE_ATOMIC(Type) Type
27# define ENTT_ID_TYPE std::uint32_t
32#ifndef ENTT_SPARSE_PAGE
33# define ENTT_SPARSE_PAGE 4096
36#ifndef ENTT_PACKED_PAGE
37# define ENTT_PACKED_PAGE 1024
40#ifdef ENTT_DISABLE_ASSERT
42# define ENTT_ASSERT(condition, msg) (void(0))
43#elif !defined ENTT_ASSERT
45# define ENTT_ASSERT(condition, msg) assert(condition)
48#ifdef ENTT_DISABLE_ASSERT
49# undef ENTT_ASSERT_CONSTEXPR
50# define ENTT_ASSERT_CONSTEXPR(condition, msg) (void(0))
51#elif !defined ENTT_ASSERT_CONSTEXPR
52# define ENTT_ASSERT_CONSTEXPR(condition, msg) ENTT_ASSERT(condition, msg)
55#define ENTT_FAIL(msg) ENTT_ASSERT(false, msg);
58# define ENTT_ETO_TYPE(Type) void
60# define ENTT_ETO_TYPE(Type) Type
63#ifdef ENTT_STANDARD_CPP
64# define ENTT_NONSTD false
66# define ENTT_NONSTD true
67# if defined __clang__ || defined __GNUC__
68# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
69# define ENTT_PRETTY_FUNCTION_PREFIX '='
70# define ENTT_PRETTY_FUNCTION_SUFFIX ']'
71# elif defined _MSC_VER
72# define ENTT_PRETTY_FUNCTION __FUNCSIG__
73# define ENTT_PRETTY_FUNCTION_PREFIX '<'
74# define ENTT_PRETTY_FUNCTION_SUFFIX '>'
79# pragma detect_mismatch("entt.version", ENTT_VERSION)
80# pragma detect_mismatch("entt.noexcept", ENTT_XSTR(ENTT_TRY))
81# pragma detect_mismatch("entt.id", ENTT_XSTR(ENTT_ID_TYPE))
82# pragma detect_mismatch("entt.nonstd", ENTT_XSTR(ENTT_NONSTD))