config: decouple ENTT_NOEXCEPT and exceptions handling (close #867)
This commit is contained in:
2
TODO
2
TODO
@@ -17,7 +17,7 @@ WIP:
|
||||
* entity-only and exclude-only views
|
||||
* custom allocators all over
|
||||
* remove storage::patch
|
||||
* use ENTT_NOEXCEPT_IF as appropriate (ie make compressed_pair conditionally noexcept)
|
||||
* consider removing ENTT_NOEXCEPT, use ENTT_NOEXCEPT_IF (or noexcept(...)) as appropriate in any case (ie make compressed_pair conditionally noexcept)
|
||||
|
||||
WIP:
|
||||
* add user data to type_info
|
||||
|
||||
@@ -4,19 +4,22 @@
|
||||
#include "version.h"
|
||||
|
||||
#if defined(__cpp_exceptions) && !defined(ENTT_NOEXCEPTION)
|
||||
# define ENTT_NOEXCEPT noexcept
|
||||
# define ENTT_NOEXCEPT_IF(expr) noexcept(expr)
|
||||
# define ENTT_THROW throw
|
||||
# define ENTT_TRY try
|
||||
# define ENTT_CATCH catch(...)
|
||||
#else
|
||||
# define ENTT_NOEXCEPT
|
||||
# define ENTT_NOEXCEPT_IF(...)
|
||||
# define ENTT_THROW
|
||||
# define ENTT_TRY if(true)
|
||||
# define ENTT_CATCH if(false)
|
||||
#endif
|
||||
|
||||
#ifndef ENTT_NOEXCEPT
|
||||
# define ENTT_NOEXCEPT noexcept
|
||||
# define ENTT_NOEXCEPT_IF(expr) noexcept(expr)
|
||||
# else
|
||||
# define ENTT_NOEXCEPT_IF(...)
|
||||
#endif
|
||||
|
||||
#ifdef ENTT_USE_ATOMIC
|
||||
# include <atomic>
|
||||
# define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
|
||||
|
||||
Reference in New Issue
Block a user