@@ -200,6 +200,7 @@ if(ENTT_INCLUDE_HEADERS)
stl/array.hpp
stl/atomic.hpp
stl/bit.hpp
+ stl/cassert.hpp
stl/compare.hpp
stl/concepts.hpp
stl/cstddef.hpp
@@ -56,7 +56,7 @@
# undef ENTT_ASSERT
# define ENTT_ASSERT(condition, msg) (void(0))
#elif !defined ENTT_ASSERT
-# include <cassert>
+# include "../stl/cassert.hpp"
# define ENTT_ASSERT(condition, msg) assert(((condition) && (msg)))
#endif
@@ -0,0 +1,15 @@
+#ifndef ENTT_STL_CASSERT_HPP
+#define ENTT_STL_CASSERT_HPP
+
+/*! @cond ENTT_INTERNAL */
+#if __has_include(<entt/ext/stl/cassert.hpp>)
+# include <entt/ext/stl/cassert.hpp>
+#else
+# include <cassert>
+namespace entt::stl {
+} // namespace entt::stl
+#endif
+/*! @endcond */
@@ -397,6 +397,7 @@ SETUP_BASIC_TEST(
entt/stl_ext/array.cpp
entt/stl_ext/atomic.cpp
entt/stl_ext/bit.cpp
+ entt/stl_ext/cassert.cpp
entt/stl_ext/compare.cpp
entt/stl_ext/concepts.cpp
entt/stl_ext/cstddef.cpp
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include <entt/stl/cassert.hpp>
+TEST(CAssert, HasInclude) {
+ static_assert(entt::stl::entt_ext_cassert, "Header not properly included");
+}
@@ -0,0 +1,13 @@
+#ifndef ENTT_EXT_STL_CASSERT_HPP
+#define ENTT_EXT_STL_CASSERT_HPP
+#include <cassert>
+using namespace std;
+inline constexpr auto entt_ext_cassert = true;