فهرست منبع

stl: get rid of ENTT_HAS_RANGES

skypjack 1 هفته پیش
والد
کامیت
938be3d9c5
3فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 3 2
      src/entt/core/ranges.hpp
  2. 3 2
      src/entt/entity/ranges.hpp
  3. 0 1
      src/entt/stl/ranges.hpp

+ 3 - 2
src/entt/core/ranges.hpp

@@ -1,9 +1,10 @@
 #ifndef ENTT_CORE_RANGES_HPP
 #define ENTT_CORE_RANGES_HPP
 
-#include "../stl/ranges.hpp"
+#include "../stl/version.hpp"
 
-#ifdef ENTT_HAS_RANGES
+#if defined(__cpp_lib_ranges)
+#    include "../stl/ranges.hpp"
 #    include "iterator.hpp"
 
 template<class... Args>

+ 3 - 2
src/entt/entity/ranges.hpp

@@ -1,9 +1,10 @@
 #ifndef ENTT_ENTITY_RANGES_HPP
 #define ENTT_ENTITY_RANGES_HPP
 
-#include "../stl/ranges.hpp"
+#include "../stl/version.hpp"
 
-#ifdef ENTT_HAS_RANGES
+#if defined(__cpp_lib_ranges)
+#    include "../stl/ranges.hpp"
 #    include "fwd.hpp"
 
 template<class... Args>

+ 0 - 1
src/entt/stl/ranges.hpp

@@ -5,7 +5,6 @@
 
 #if defined(__cpp_lib_ranges)
 #    include <ranges>
-#    define ENTT_HAS_RANGES
 
 /*! @cond ENTT_INTERNAL */
 namespace entt::stl::ranges {