skypjack пре 4 недеља
родитељ
комит
48eaf4bdbf

+ 0 - 1
CMakeLists.txt

@@ -205,7 +205,6 @@ if(ENTT_INCLUDE_HEADERS)
         stl/cstdint.hpp
         stl/functional.hpp
         stl/iterator.hpp
-        stl/limits.hpp
         stl/memory.hpp
         stl/ostream.hpp
         stl/string.hpp

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

@@ -13,7 +13,6 @@
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"
-#include "../stl/limits.hpp"
 #include "../stl/memory.hpp"
 #include "../stl/tuple.hpp"
 #include "../stl/type_traits.hpp"
@@ -26,7 +25,7 @@ namespace entt {
 /*! @cond ENTT_INTERNAL */
 namespace internal {
 
-static constexpr stl::size_t dense_map_placeholder_position = (stl::numeric_limits<stl::size_t>::max)();
+static constexpr stl::size_t dense_map_placeholder_position = ~static_cast<stl::size_t>(0);
 
 template<typename Key, typename Type>
 struct dense_map_node final {

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

@@ -11,7 +11,6 @@
 #include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"
-#include "../stl/limits.hpp"
 #include "../stl/memory.hpp"
 #include "../stl/tuple.hpp"
 #include "../stl/type_traits.hpp"
@@ -24,7 +23,7 @@ namespace entt {
 /*! @cond ENTT_INTERNAL */
 namespace internal {
 
-static constexpr stl::size_t dense_set_placeholder_position = (stl::numeric_limits<stl::size_t>::max)();
+static constexpr stl::size_t dense_set_placeholder_position = ~static_cast<stl::size_t>(0);
 
 template<typename It>
 class dense_set_iterator final {

+ 0 - 1
src/entt/entt.hpp

@@ -78,7 +78,6 @@ namespace entt::stl {}
 #include "stl/cstdint.hpp"
 #include "stl/functional.hpp"
 #include "stl/iterator.hpp"
-#include "stl/limits.hpp"
 #include "stl/memory.hpp"
 #include "stl/ostream.hpp"
 #include "stl/string.hpp"

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

@@ -2,7 +2,6 @@
 #define ENTT_META_FWD_HPP
 
 #include "../stl/cstddef.hpp"
-#include "../stl/limits.hpp"
 
 namespace entt {
 
@@ -30,7 +29,7 @@ template<typename>
 class meta_factory;
 
 /*! @brief Used to identicate that a sequence container has not a fixed size. */
-inline constexpr stl::size_t meta_dynamic_extent = (stl::numeric_limits<stl::size_t>::max)();
+inline constexpr stl::size_t meta_dynamic_extent = ~static_cast<stl::size_t>(0);
 
 /*! @brief Disambiguation tag for constructors and the like. */
 struct meta_ctx_arg_t final {};

+ 0 - 18
src/entt/stl/limits.hpp

@@ -1,18 +0,0 @@
-#ifndef ENTT_STL_LIMITS_HPP
-#define ENTT_STL_LIMITS_HPP
-
-/*! @cond ENTT_INTERNAL */
-#if __has_include(<entt/ext/stl/limits.hpp>)
-#    include <entt/ext/stl/limits.hpp>
-#else
-#    include <limits>
-
-namespace entt::stl {
-
-using std::numeric_limits;
-
-} // namespace entt::stl
-#endif
-/*! @endcond */
-
-#endif

+ 0 - 1
test/CMakeLists.txt

@@ -402,7 +402,6 @@ SETUP_BASIC_TEST(
         entt/stl_ext/cstdint.cpp
         entt/stl_ext/functional.cpp
         entt/stl_ext/iterator.cpp
-        entt/stl_ext/limits.cpp
         entt/stl_ext/memory.cpp
         entt/stl_ext/ostream.cpp
         entt/stl_ext/string.cpp

+ 0 - 6
test/entt/stl_ext/limits.cpp

@@ -1,6 +0,0 @@
-#include <gtest/gtest.h>
-#include <entt/stl/limits.hpp>
-
-TEST(Limits, HasInclude) {
-    static_assert(entt::stl::entt_ext_limits, "Header not properly included");
-}

+ 0 - 13
test/include/entt/ext/stl/limits.hpp

@@ -1,13 +0,0 @@
-#ifndef ENTT_EXT_STL_LIMITS_HPP
-#define ENTT_EXT_STL_LIMITS_HPP
-
-/*! @cond ENTT_INTERNAL */
-#include <limits>
-
-namespace entt::stl {
-using namespace std;
-static constexpr auto entt_ext_limits = true;
-} // namespace entt::stl
-/*! @endcond */
-
-#endif