@@ -1,15 +1,19 @@
#ifndef ENTT_STL_STRING_VIEW_HPP
#define ENTT_STL_STRING_VIEW_HPP
-#include <string_view>
-
/*! @cond ENTT_INTERNAL */
+#if __has_include(<entt/ext/stl/string_view.hpp>)
+# include <entt/ext/stl/string_view.hpp>
+#else
+# include <string_view>
+
namespace entt::stl {
using std::string_view;
using std::swap;
} // namespace entt::stl
+#endif
/*! @endcond */
#endif
@@ -1,2 +1,6 @@
#include <gtest/gtest.h>
#include <entt/stl/string_view.hpp>
+TEST(StringView, HasInclude) {
+ static_assert(entt::stl::entt_ext_string_view, "Header not properly included");
+}
@@ -0,0 +1,13 @@
+#ifndef ENTT_EXT_STL_STRING_VIEW_HPP
+#define ENTT_EXT_STL_STRING_VIEW_HPP
+/*! @cond ENTT_INTERNAL */
+#include <string_view>
+namespace entt::stl {
+using namespace std;
+static constexpr auto entt_ext_string_view = true;
+} // namespace entt::stl
+/*! @endcond */