core: update guard for ranges

This commit is contained in:
Michele Caini
2024-07-09 10:11:41 +02:00
parent 59d5e59aa4
commit fe76478dbc

View File

@@ -1,10 +1,12 @@
#ifndef ENTT_CORE_RANGES_HPP
#define ENTT_CORE_RANGES_HPP
#if __cplusplus >= 202002L
# include <ranges>
# include "iterator.hpp"
#if __has_include(<version>)
# include <version>
#
# if defined(__cpp_lib_ranges)
# include <ranges>
# include "iterator.hpp"
template<class... Args>
inline constexpr bool std::ranges::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
@@ -12,6 +14,7 @@ inline constexpr bool std::ranges::enable_borrowed_range<entt::iterable_adaptor<
template<class... Args>
inline constexpr bool std::ranges::enable_view<entt::iterable_adaptor<Args...>>{true};
# endif
#endif
#endif