Browse Source

stl: concepts.hpp

skypjack 1 tháng trước cách đây
mục cha
commit
0ebf92f015

+ 1 - 0
CMakeLists.txt

@@ -200,6 +200,7 @@ if(ENTT_INCLUDE_HEADERS)
         stl/atomic.hpp
         stl/bit.hpp
         stl/cmath.hpp
+        stl/concepts.hpp
         stl/cstddef.hpp
         stl/cstdint.hpp
         stl/functional.hpp

+ 1 - 1
src/entt/container/dense_map.hpp

@@ -2,7 +2,6 @@
 #define ENTT_CONTAINER_DENSE_MAP_HPP
 
 #include <compare>
-#include <concepts>
 #include "../config/config.h"
 #include "../core/bit.hpp"
 #include "../core/compressed_pair.hpp"
@@ -11,6 +10,7 @@
 #include "../core/type_traits.hpp"
 #include "../stl/bit.hpp"
 #include "../stl/cmath.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

+ 1 - 1
src/entt/container/dense_set.hpp

@@ -2,13 +2,13 @@
 #define ENTT_CONTAINER_DENSE_SET_HPP
 
 #include <compare>
-#include <concepts>
 #include "../config/config.h"
 #include "../core/bit.hpp"
 #include "../core/compressed_pair.hpp"
 #include "../core/type_traits.hpp"
 #include "../stl/bit.hpp"
 #include "../stl/cmath.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

+ 1 - 1
src/entt/container/table.hpp

@@ -1,9 +1,9 @@
 #ifndef ENTT_CONTAINER_TABLE_HPP
 #define ENTT_CONTAINER_TABLE_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/iterator.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/tuple.hpp"

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

@@ -1,8 +1,8 @@
 #ifndef ENTT_CORE_ALGORITHM_HPP
 #define ENTT_CORE_ALGORITHM_HPP
 
-#include <concepts>
 #include "../stl/algorithm.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

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

@@ -1,9 +1,9 @@
 #ifndef ENTT_CORE_ANY_HPP
 #define ENTT_CORE_ANY_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/concepts.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/cstdint.hpp"
 #include "../stl/memory.hpp"

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

@@ -1,9 +1,9 @@
 #ifndef ENTT_CORE_BIT_HPP
 #define ENTT_CORE_BIT_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../stl/bit.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 
 namespace entt {

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

@@ -1,7 +1,7 @@
 #ifndef ENTT_CORE_COMPRESSED_PAIR_HPP
 #define ENTT_CORE_COMPRESSED_PAIR_HPP
 
-#include <concepts>
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/tuple.hpp"
 #include "../stl/type_traits.hpp"

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

@@ -1,7 +1,7 @@
 #ifndef ENTT_CORE_ENUM_HPP
 #define ENTT_CORE_ENUM_HPP
 
-#include <concepts>
+#include "../stl/concepts.hpp"
 #include "../stl/type_traits.hpp"
 
 namespace entt {

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

@@ -1,7 +1,7 @@
 #ifndef ENTT_CORE_ITERATOR_HPP
 #define ENTT_CORE_ITERATOR_HPP
 
-#include <concepts>
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/memory.hpp"

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

@@ -1,8 +1,8 @@
 #ifndef ENTT_CORE_TYPE_TRAITS_HPP
 #define ENTT_CORE_TYPE_TRAITS_HPP
 
-#include <concepts>
 #include "../config/config.h"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/tuple.hpp"

+ 1 - 1
src/entt/entity/component.hpp

@@ -1,9 +1,9 @@
 #ifndef ENTT_ENTITY_COMPONENT_HPP
 #define ENTT_ENTITY_COMPONENT_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/concepts.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/type_traits.hpp"
 #include "fwd.hpp"

+ 1 - 1
src/entt/entity/entity.hpp

@@ -1,10 +1,10 @@
 #ifndef ENTT_ENTITY_ENTITY_HPP
 #define ENTT_ENTITY_ENTITY_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/bit.hpp"
 #include "../stl/bit.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/cstdint.hpp"
 #include "../stl/type_traits.hpp"

+ 1 - 1
src/entt/entity/group.hpp

@@ -1,7 +1,6 @@
 #ifndef ENTT_ENTITY_GROUP_HPP
 #define ENTT_ENTITY_GROUP_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/algorithm.hpp"
 #include "../core/fwd.hpp"
@@ -9,6 +8,7 @@
 #include "../core/type_info.hpp"
 #include "../core/type_traits.hpp"
 #include "../stl/array.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/tuple.hpp"

+ 1 - 1
src/entt/entity/mixin.hpp

@@ -1,11 +1,11 @@
 #ifndef ENTT_ENTITY_MIXIN_HPP
 #define ENTT_ENTITY_MIXIN_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/any.hpp"
 #include "../core/type_info.hpp"
 #include "../signal/sigh.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/type_traits.hpp"
 #include "../stl/utility.hpp"

+ 1 - 1
src/entt/entity/registry.hpp

@@ -2,7 +2,6 @@
 #define ENTT_ENTITY_REGISTRY_HPP
 
 #include <compare>
-#include <concepts>
 #include "../config/config.h"
 #include "../container/dense_map.hpp"
 #include "../core/algorithm.hpp"
@@ -15,6 +14,7 @@
 #include "../core/type_traits.hpp"
 #include "../stl/algorithm.hpp"
 #include "../stl/array.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

+ 1 - 1
src/entt/entity/snapshot.hpp

@@ -1,10 +1,10 @@
 #ifndef ENTT_ENTITY_SNAPSHOT_HPP
 #define ENTT_ENTITY_SNAPSHOT_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../container/dense_map.hpp"
 #include "../core/type_traits.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/tuple.hpp"

+ 1 - 1
src/entt/entity/sparse_set.hpp

@@ -2,12 +2,12 @@
 #define ENTT_ENTITY_SPARSE_SET_HPP
 
 #include <compare>
-#include <concepts>
 #include "../config/config.h"
 #include "../core/algorithm.hpp"
 #include "../core/any.hpp"
 #include "../core/bit.hpp"
 #include "../core/type_info.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/memory.hpp"

+ 1 - 1
src/entt/entity/storage.hpp

@@ -2,12 +2,12 @@
 #define ENTT_ENTITY_STORAGE_HPP
 
 #include <compare>
-#include <concepts>
 #include "../config/config.h"
 #include "../core/bit.hpp"
 #include "../core/iterator.hpp"
 #include "../core/memory.hpp"
 #include "../core/type_info.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/memory.hpp"

+ 1 - 1
src/entt/entity/view.hpp

@@ -1,12 +1,12 @@
 #ifndef ENTT_ENTITY_VIEW_HPP
 #define ENTT_ENTITY_VIEW_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/concepts.hpp"
 #include "../core/iterator.hpp"
 #include "../core/type_traits.hpp"
 #include "../stl/array.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/tuple.hpp"

+ 1 - 0
src/entt/entt.hpp

@@ -74,6 +74,7 @@ namespace entt::stl {}
 #include "stl/atomic.hpp"
 #include "stl/bit.hpp"
 #include "stl/cmath.hpp"
+#include "stl/concepts.hpp"
 #include "stl/cstddef.hpp"
 #include "stl/cstdint.hpp"
 #include "stl/functional.hpp"

+ 1 - 1
src/entt/graph/adjacency_matrix.hpp

@@ -1,9 +1,9 @@
 #ifndef ENTT_GRAPH_ADJACENCY_MATRIX_HPP
 #define ENTT_GRAPH_ADJACENCY_MATRIX_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/iterator.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/memory.hpp"

+ 1 - 1
src/entt/graph/dot.hpp

@@ -1,8 +1,8 @@
 #ifndef ENTT_GRAPH_DOT_HPP
 #define ENTT_GRAPH_DOT_HPP
 
-#include <concepts>
 #include <ostream>
+#include "../stl/concepts.hpp"
 #include "fwd.hpp"
 
 namespace entt {

+ 1 - 1
src/entt/graph/flow.hpp

@@ -1,7 +1,6 @@
 #ifndef ENTT_GRAPH_FLOW_HPP
 #define ENTT_GRAPH_FLOW_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../container/dense_map.hpp"
 #include "../container/dense_set.hpp"
@@ -9,6 +8,7 @@
 #include "../core/fwd.hpp"
 #include "../core/iterator.hpp"
 #include "../stl/algorithm.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

+ 1 - 1
src/entt/graph/fwd.hpp

@@ -1,8 +1,8 @@
 #ifndef ENTT_GRAPH_FWD_HPP
 #define ENTT_GRAPH_FWD_HPP
 
-#include <concepts>
 #include "../core/fwd.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/memory.hpp"
 

+ 1 - 1
src/entt/locator/locator.hpp

@@ -1,8 +1,8 @@
 #ifndef ENTT_LOCATOR_LOCATOR_HPP
 #define ENTT_LOCATOR_LOCATOR_HPP
 
-#include <concepts>
 #include "../config/config.h"
+#include "../stl/concepts.hpp"
 #include "../stl/memory.hpp"
 #include "../stl/utility.hpp"
 

+ 1 - 1
src/entt/meta/container.hpp

@@ -3,9 +3,9 @@
 #ifndef ENTT_META_CONTAINER_HPP
 #define ENTT_META_CONTAINER_HPP
 
-#include <concepts>
 #include "../core/concepts.hpp"
 #include "../core/type_traits.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/type_traits.hpp"

+ 1 - 1
src/entt/meta/factory.hpp

@@ -1,7 +1,6 @@
 #ifndef ENTT_META_FACTORY_HPP
 #define ENTT_META_FACTORY_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/bit.hpp"
 #include "../core/fwd.hpp"
@@ -9,6 +8,7 @@
 #include "../core/type_info.hpp"
 #include "../core/type_traits.hpp"
 #include "../locator/locator.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/cstdint.hpp"
 #include "../stl/functional.hpp"

+ 1 - 1
src/entt/meta/meta.hpp

@@ -1,7 +1,6 @@
 #ifndef ENTT_META_META_HPP
 #define ENTT_META_META_HPP
 
-#include <concepts>
 #include "../config/config.h"
 #include "../core/any.hpp"
 #include "../core/concepts.hpp"
@@ -12,6 +11,7 @@
 #include "../core/utility.hpp"
 #include "../locator/locator.hpp"
 #include "../stl/array.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/memory.hpp"

+ 1 - 1
src/entt/meta/range.hpp

@@ -2,9 +2,9 @@
 #define ENTT_META_RANGE_HPP
 
 #include <compare>
-#include <concepts>
 #include "../core/fwd.hpp"
 #include "../core/iterator.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/utility.hpp"

+ 1 - 1
src/entt/poly/poly.hpp

@@ -1,11 +1,11 @@
 #ifndef ENTT_POLY_POLY_HPP
 #define ENTT_POLY_POLY_HPP
 
-#include <concepts>
 #include "../core/any.hpp"
 #include "../core/concepts.hpp"
 #include "../core/type_info.hpp"
 #include "../core/type_traits.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/tuple.hpp"

+ 1 - 1
src/entt/resource/cache.hpp

@@ -2,11 +2,11 @@
 #define ENTT_RESOURCE_RESOURCE_CACHE_HPP
 
 #include <compare>
-#include <concepts>
 #include "../container/dense_map.hpp"
 #include "../core/compressed_pair.hpp"
 #include "../core/fwd.hpp"
 #include "../core/iterator.hpp"
+#include "../stl/concepts.hpp"
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"

+ 1 - 1
src/entt/resource/resource.hpp

@@ -2,7 +2,7 @@
 #define ENTT_RESOURCE_RESOURCE_HPP
 
 #include <compare>
-#include <concepts>
+#include "../stl/concepts.hpp"
 #include "../stl/memory.hpp"
 #include "../stl/utility.hpp"
 #include "fwd.hpp"

+ 12 - 0
src/entt/stl/concepts.hpp

@@ -0,0 +1,12 @@
+#ifndef ENTT_STL_CONCEPTS_HPP
+#define ENTT_STL_CONCEPTS_HPP
+
+#include <concepts>
+
+/*! @cond ENTT_INTERNAL */
+namespace entt::stl {
+
+} // namespace entt::stl
+/*! @endcond */
+
+#endif

+ 1 - 1
src/entt/stl/iterator.hpp

@@ -35,8 +35,8 @@ using std::sentinel_for;
 #endif
 
 #ifndef ENTT_HAS_ITERATOR_CONCEPTS
-#    include <concepts>
 #    include <utility>
+#    include "concepts.hpp"
 
 namespace internal {