ソースを参照

stl: drop ranges.hpp - some things do not fit custom implementations, that's all

skypjack 1 週間 前
コミット
a931a83870
5 ファイル変更8 行追加32 行削除
  1. 0 1
      CMakeLists.txt
  2. 3 3
      src/entt/core/ranges.hpp
  3. 5 5
      src/entt/entity/ranges.hpp
  4. 0 1
      src/entt/entt.hpp
  5. 0 22
      src/entt/stl/ranges.hpp

+ 0 - 1
CMakeLists.txt

@@ -209,7 +209,6 @@ if(ENTT_INCLUDE_HEADERS)
         stl/limits.hpp
         stl/memory.hpp
         stl/ostream.hpp
-        stl/ranges.hpp
         stl/sstream.hpp
         stl/string.hpp
         stl/string_view.hpp

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

@@ -4,14 +4,14 @@
 #include "../stl/version.hpp"
 
 #if defined(__cpp_lib_ranges)
-#    include "../stl/ranges.hpp"
+#    include <ranges>
 #    include "iterator.hpp"
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
+inline constexpr bool std::ranges::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_view<entt::iterable_adaptor<Args...>>{true};
+inline constexpr bool std::ranges::enable_view<entt::iterable_adaptor<Args...>>{true};
 
 #endif
 

+ 5 - 5
src/entt/entity/ranges.hpp

@@ -4,20 +4,20 @@
 #include "../stl/version.hpp"
 
 #if defined(__cpp_lib_ranges)
-#    include "../stl/ranges.hpp"
+#    include <ranges>
 #    include "fwd.hpp"
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::basic_view<Args...>>{true};
+inline constexpr bool std::ranges::enable_borrowed_range<entt::basic_view<Args...>>{true};
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::basic_group<Args...>>{true};
+inline constexpr bool std::ranges::enable_borrowed_range<entt::basic_group<Args...>>{true};
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_view<entt::basic_view<Args...>>{true};
+inline constexpr bool std::ranges::enable_view<entt::basic_view<Args...>>{true};
 
 template<class... Args>
-inline constexpr bool ENTT_STL_RANGES::enable_view<entt::basic_group<Args...>>{true};
+inline constexpr bool std::ranges::enable_view<entt::basic_group<Args...>>{true};
 
 #endif
 

+ 0 - 1
src/entt/entt.hpp

@@ -83,7 +83,6 @@ namespace entt::stl {}
 #include "stl/limits.hpp"
 #include "stl/memory.hpp"
 #include "stl/ostream.hpp"
-#include "stl/ranges.hpp"
 #include "stl/sstream.hpp"
 #include "stl/string.hpp"
 #include "stl/string_view.hpp"

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

@@ -1,22 +0,0 @@
-#ifndef ENTT_STL_RANGES_HPP
-#define ENTT_STL_RANGES_HPP
-
-#include "../stl/version.hpp"
-
-#if defined(__cpp_lib_ranges)
-#    include <ranges>
-
-/*! @cond ENTT_INTERNAL */
-namespace entt::stl::ranges {
-
-// nothing to import (yet)
-
-} // namespace entt::stl::ranges
-
-#    define ENTT_STL_RANGES std::ranges
-
-/*! @endcond */
-
-#endif
-
-#endif