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)
22# define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
24# define ENTT_MAYBE_ATOMIC(Type) Type
29# define ENTT_ID_TYPE std::uint32_t
34#ifndef ENTT_SPARSE_PAGE
35# define ENTT_SPARSE_PAGE 4096
38#ifndef ENTT_PACKED_PAGE
39# define ENTT_PACKED_PAGE 1024
42#ifdef ENTT_DISABLE_ASSERT
44# define ENTT_ASSERT(condition, msg) (void(0))
45#elif !defined ENTT_ASSERT
47# define ENTT_ASSERT(condition, msg) assert(((condition) && (msg)))
50#ifdef ENTT_DISABLE_ASSERT
51# undef ENTT_ASSERT_CONSTEXPR
52# define ENTT_ASSERT_CONSTEXPR(condition, msg) (void(0))
53#elif !defined ENTT_ASSERT_CONSTEXPR
54# define ENTT_ASSERT_CONSTEXPR(condition, msg) ENTT_ASSERT(condition, msg)
57#define ENTT_FAIL(msg) ENTT_ASSERT(false, msg);
60# define ENTT_ETO_TYPE(Type) void
62# define ENTT_ETO_TYPE(Type) Type
66# define ENTT_STORAGE(Mixin, ...) __VA_ARGS__
68# define ENTT_STORAGE(Mixin, ...) Mixin<__VA_ARGS__>
71#ifdef ENTT_STANDARD_CPP
72# define ENTT_NONSTD false
74# define ENTT_NONSTD true
75# if defined __clang__ || defined __GNUC__
76# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
77# define ENTT_PRETTY_FUNCTION_PREFIX '='
78# define ENTT_PRETTY_FUNCTION_SUFFIX ']'
79# elif defined _MSC_VER
80# define ENTT_PRETTY_FUNCTION __FUNCSIG__
81# define ENTT_PRETTY_FUNCTION_PREFIX '<'
82# define ENTT_PRETTY_FUNCTION_SUFFIX '>'
87# pragma detect_mismatch("entt.version", ENTT_VERSION)
88# pragma detect_mismatch("entt.noexcept", ENTT_XSTR(ENTT_TRY))
89# pragma detect_mismatch("entt.id", ENTT_XSTR(ENTT_ID_TYPE))
90# pragma detect_mismatch("entt.nonstd", ENTT_XSTR(ENTT_NONSTD))