EnTT
3.10.0
src
entt
config
config.h
1
#ifndef ENTT_CONFIG_CONFIG_H
2
#define ENTT_CONFIG_CONFIG_H
3
4
#include "version.h"
5
6
#if defined(__cpp_exceptions) && !defined(ENTT_NOEXCEPTION)
7
# define ENTT_NOEXCEPT noexcept
8
# define ENTT_NOEXCEPT_IF(expr) noexcept(expr)
9
# define ENTT_THROW throw
10
# define ENTT_TRY try
11
# define ENTT_CATCH catch(...)
12
#else
13
# define ENTT_NOEXCEPT
14
# define ENTT_NOEXCEPT_IF(...)
15
# define ENTT_THROW
16
# define ENTT_TRY if(true)
17
# define ENTT_CATCH if(false)
18
#endif
19
20
#ifdef ENTT_USE_ATOMIC
21
# include <atomic>
22
# define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
23
#else
24
# define ENTT_MAYBE_ATOMIC(Type) Type
25
#endif
26
27
#ifndef ENTT_ID_TYPE
28
# include <cstdint>
29
# define ENTT_ID_TYPE std::uint32_t
30
#endif
31
32
#ifndef ENTT_SPARSE_PAGE
33
# define ENTT_SPARSE_PAGE 4096
34
#endif
35
36
#ifndef ENTT_PACKED_PAGE
37
# define ENTT_PACKED_PAGE 1024
38
#endif
39
40
#ifdef ENTT_DISABLE_ASSERT
41
# undef ENTT_ASSERT
42
# define ENTT_ASSERT(...) (void(0))
43
#elif !defined ENTT_ASSERT
44
# include <cassert>
45
# define ENTT_ASSERT(condition, ...) assert(condition)
46
#endif
47
48
#ifdef ENTT_NO_ETO
49
# define ENTT_IGNORE_IF_EMPTY false
50
#else
51
# define ENTT_IGNORE_IF_EMPTY true
52
#endif
53
54
#ifdef ENTT_STANDARD_CPP
55
# define ENTT_NONSTD false
56
#else
57
# define ENTT_NONSTD true
58
# if defined __clang__ || defined __GNUC__
59
# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
60
# define ENTT_PRETTY_FUNCTION_PREFIX '='
61
# define ENTT_PRETTY_FUNCTION_SUFFIX ']'
62
# elif defined _MSC_VER
63
# define ENTT_PRETTY_FUNCTION __FUNCSIG__
64
# define ENTT_PRETTY_FUNCTION_PREFIX '<'
65
# define ENTT_PRETTY_FUNCTION_SUFFIX '>'
66
# endif
67
#endif
68
69
#if defined _MSC_VER
70
# pragma detect_mismatch("entt.version"
, ENTT_VERSION)
71
# pragma detect_mismatch("entt.noexcept"
, ENTT_XSTR(ENTT_TRY))
72
# pragma detect_mismatch("entt.id"
, ENTT_XSTR(ENTT_ID_TYPE))
73
# pragma detect_mismatch("entt.nonstd"
, ENTT_XSTR(ENTT_NONSTD))
74
#endif
75
76
#endif
Generated by
1.9.1