Bläddra i källkod

config: drop ENTT_CONSTEXPR

skypjack 3 månader sedan
förälder
incheckning
a6638cd026
2 ändrade filer med 1 tillägg och 3 borttagningar
  1. 0 2
      src/entt/config/config.h
  2. 1 1
      src/entt/core/memory.hpp

+ 0 - 2
src/entt/config/config.h

@@ -6,12 +6,10 @@
 // NOLINTBEGIN(cppcoreguidelines-macro-usage)
 
 #if defined(__cpp_exceptions) && !defined(ENTT_NOEXCEPTION)
-#    define ENTT_CONSTEXPR
 #    define ENTT_THROW throw
 #    define ENTT_TRY try
 #    define ENTT_CATCH catch(...)
 #else
-#    define ENTT_CONSTEXPR constexpr // use only with throwing functions (waiting for C++20)
 #    define ENTT_THROW
 #    define ENTT_TRY if(true)
 #    define ENTT_CATCH if(false)

+ 1 - 1
src/entt/core/memory.hpp

@@ -106,7 +106,7 @@ struct allocation_deleter: private Allocator {
  * @return A properly initialized unique pointer with a custom deleter.
  */
 template<typename Type, typename Allocator, typename... Args>
-ENTT_CONSTEXPR auto allocate_unique(Allocator &allocator, Args &&...args) {
+constexpr auto allocate_unique(Allocator &allocator, Args &&...args) {
     static_assert(!std::is_array_v<Type>, "Array types are not supported");
 
     using alloc_traits = typename std::allocator_traits<Allocator>::template rebind_traits<Type>;