@@ -1,9 +1,12 @@
#ifndef ENTT_STL_BIT_HPP
#define ENTT_STL_BIT_HPP
-#include <bit>
-
/*! @cond ENTT_INTERNAL */
+#if __has_include(<entt/ext/stl/bit.hpp>)
+# include <entt/ext/stl/bit.hpp>
+#else
+# include <bit>
+
namespace entt::stl {
using std::bit_ceil;
@@ -11,6 +14,7 @@ using std::has_single_bit;
using std::popcount;
} // namespace entt::stl
+#endif
/*! @endcond */
#endif
@@ -1,2 +1,6 @@
#include <gtest/gtest.h>
#include <entt/stl/bit.hpp>
+TEST(Bit, HasInclude) {
+ static_assert(entt::stl::entt_ext_bit, "Header not properly included");
+}
@@ -0,0 +1,13 @@
+#ifndef ENTT_EXT_STL_BIT_HPP
+#define ENTT_EXT_STL_BIT_HPP
+/*! @cond ENTT_INTERNAL */
+#include <bit>
+namespace entt::stl {
+using namespace std;
+static constexpr auto entt_ext_bit = true;
+} // namespace entt::stl
+/*! @endcond */