diff --git a/src/entt/core/ranges.hpp b/src/entt/core/ranges.hpp index 2f585eb9f..c1d062c70 100644 --- a/src/entt/core/ranges.hpp +++ b/src/entt/core/ranges.hpp @@ -1,10 +1,12 @@ #ifndef ENTT_CORE_RANGES_HPP #define ENTT_CORE_RANGES_HPP -#if __cplusplus >= 202002L - -# include -# include "iterator.hpp" +#if __has_include() +# include +# +# if defined(__cpp_lib_ranges) +# include +# include "iterator.hpp" template inline constexpr bool std::ranges::enable_borrowed_range>{true}; @@ -12,6 +14,7 @@ inline constexpr bool std::ranges::enable_borrowed_range inline constexpr bool std::ranges::enable_view>{true}; +# endif #endif #endif \ No newline at end of file