diff --git a/src/entt/config/config.h b/src/entt/config/config.h index e98f63c83..fa7620cdc 100644 --- a/src/entt/config/config.h +++ b/src/entt/config/config.h @@ -24,13 +24,9 @@ # define ENTT_CATCH if(false) #endif -#ifdef ENTT_HAS_VERSION -# if defined(__cpp_consteval) -# define ENTT_CONSTEVAL consteval -# endif -#endif - -#ifndef ENTT_CONSTEVAL +#if defined(__cpp_consteval) +# define ENTT_CONSTEVAL consteval +#else # define ENTT_CONSTEVAL constexpr #endif diff --git a/src/entt/stl/functional.hpp b/src/entt/stl/functional.hpp index e8e76c3c1..eb1c7c25e 100644 --- a/src/entt/stl/functional.hpp +++ b/src/entt/stl/functional.hpp @@ -17,9 +17,8 @@ using std::less; } // namespace entt::stl #ifndef ENTT_FORCE_STL -# ifdef ENTT_HAS_VERSION -# if defined(__cpp_lib_ranges) -# define ENTT_HAS_IDENTITY +# if defined(__cpp_lib_ranges) +# define ENTT_HAS_IDENTITY namespace entt::stl { @@ -27,7 +26,6 @@ using std::identity; } // namespace entt::stl -# endif # endif #endif diff --git a/src/entt/stl/iterator.hpp b/src/entt/stl/iterator.hpp index d9107e9df..5d20104cd 100644 --- a/src/entt/stl/iterator.hpp +++ b/src/entt/stl/iterator.hpp @@ -19,9 +19,8 @@ using std::random_access_iterator_tag; using std::reverse_iterator; #ifndef ENTT_FORCE_STL -# ifdef ENTT_HAS_VERSION -# if defined(__cpp_lib_ranges) -# define ENTT_HAS_ITERATOR_CONCEPTS +# if defined(__cpp_lib_ranges) +# define ENTT_HAS_ITERATOR_CONCEPTS using std::bidirectional_iterator; using std::forward_iterator; @@ -31,7 +30,6 @@ using std::output_iterator; using std::random_access_iterator; using std::sentinel_for; -# endif # endif #endif diff --git a/src/entt/stl/memory.hpp b/src/entt/stl/memory.hpp index 26a72ccf1..82bb80a7b 100644 --- a/src/entt/stl/memory.hpp +++ b/src/entt/stl/memory.hpp @@ -29,9 +29,8 @@ using std::uses_allocator_v; } // namespace entt::stl #ifndef ENTT_FORCE_STL -# ifdef ENTT_HAS_VERSION -# if defined(__cpp_lib_to_address) -# define ENTT_HAS_TO_ADDRESS +# if defined(__cpp_lib_to_address) +# define ENTT_HAS_TO_ADDRESS namespace entt::stl { @@ -39,7 +38,6 @@ using std::to_address; } // namespace entt::stl -# endif # endif #endif diff --git a/src/entt/stl/ranges.hpp b/src/entt/stl/ranges.hpp index e9491ed27..e488c1a97 100644 --- a/src/entt/stl/ranges.hpp +++ b/src/entt/stl/ranges.hpp @@ -3,10 +3,9 @@ #include "../stl/version.hpp" -#ifdef ENTT_HAS_VERSION -# if defined(__cpp_lib_ranges) -# include -# define ENTT_HAS_RANGES +#if defined(__cpp_lib_ranges) +# include +# define ENTT_HAS_RANGES /*! @cond ENTT_INTERNAL */ namespace entt::stl::ranges { @@ -17,7 +16,6 @@ using std::ranges::enable_view; } // namespace entt::stl::ranges /*! @endcond */ -# endif #endif #endif diff --git a/src/entt/stl/version.hpp b/src/entt/stl/version.hpp index bcf9c2178..fd4f917eb 100644 --- a/src/entt/stl/version.hpp +++ b/src/entt/stl/version.hpp @@ -3,7 +3,6 @@ #if __has_include() # include -# define ENTT_HAS_VERSION #endif #endif