Loading...
Searching...
No Matches
1#ifndef ENTT_CONFIG_CONFIG_H
2#define ENTT_CONFIG_CONFIG_H
4#if __has_include(<entt/ext/config.h>)
5# include <entt/ext/config.h>
14# define ENTT_FORCE_STL
17#if defined(__cpp_exceptions) && !defined(ENTT_NO_EXCEPTION)
18# define ENTT_THROW throw
20# define ENTT_CATCH catch(...)
23# define ENTT_TRY if(true)
24# define ENTT_CATCH if(false)
27#if defined(__cpp_consteval)
28# define ENTT_CONSTEVAL consteval
30# define ENTT_CONSTEVAL constexpr
34# include "../stl/atomic.hpp"
35# define ENTT_MAYBE_ATOMIC(Type) stl::atomic<Type>
37# define ENTT_MAYBE_ATOMIC(Type) Type
41# include "../stl/cstdint.hpp"
42# define ENTT_ID_TYPE stl::uint32_t
44# include "../stl/cstdint.hpp"
47#ifndef ENTT_SPARSE_PAGE
48# define ENTT_SPARSE_PAGE 4096
51#ifndef ENTT_PACKED_PAGE
52# define ENTT_PACKED_PAGE 1024
55#ifdef ENTT_DISABLE_ASSERT
57# define ENTT_ASSERT(condition, msg) (void(0))
58#elif !defined ENTT_ASSERT
60# define ENTT_ASSERT(condition, msg) assert(((condition) && (msg)))
63#ifdef ENTT_DISABLE_ASSERT
64# undef ENTT_ASSERT_CONSTEXPR
65# define ENTT_ASSERT_CONSTEXPR(condition, msg) (void(0))
66#elif !defined ENTT_ASSERT_CONSTEXPR
67# define ENTT_ASSERT_CONSTEXPR(condition, msg) ENTT_ASSERT(condition, msg)
70#define ENTT_FAIL(msg) ENTT_ASSERT(false, msg);
73# define ENTT_ETO_TYPE(Type) void
75# define ENTT_ETO_TYPE(Type) Type
79# define ENTT_STORAGE(Mixin, ...) __VA_ARGS__
81# define ENTT_STORAGE(Mixin, ...) Mixin<__VA_ARGS__>
84#ifdef ENTT_STANDARD_CPP
85# define ENTT_NONSTD false
87# define ENTT_NONSTD true
88# if defined __clang__ || defined __GNUC__
89# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
90# define ENTT_PRETTY_FUNCTION_PREFIX '='
91# define ENTT_PRETTY_FUNCTION_SUFFIX ']'
92# elif defined _MSC_VER
93# define ENTT_PRETTY_FUNCTION __FUNCSIG__
94# define ENTT_PRETTY_FUNCTION_PREFIX '<'
95# define ENTT_PRETTY_FUNCTION_SUFFIX '>'
100# if defined _WIN32 || defined __CYGWIN__ || defined _MSC_VER
101# define ENTT_EXPORT __declspec(dllexport)
102# define ENTT_IMPORT __declspec(dllimport)
104# elif defined __GNUC__ && __GNUC__ >= 4
105# define ENTT_EXPORT __attribute__((visibility("default")))
106# define ENTT_IMPORT __attribute__((visibility("default")))
107# define ENTT_HIDDEN __attribute__((visibility("hidden")))
116# if defined ENTT_API_EXPORT
117# define ENTT_API ENTT_EXPORT
118# elif defined ENTT_API_IMPORT
119# define ENTT_API ENTT_IMPORT
126# pragma detect_mismatch("entt.version", ENTT_VERSION)
127# pragma detect_mismatch("entt.noexcept", ENTT_XSTR(ENTT_TRY))
128# pragma detect_mismatch("entt.id", ENTT_XSTR(ENTT_ID_TYPE))
129# pragma detect_mismatch("entt.nonstd", ENTT_XSTR(ENTT_NONSTD))