entt
entt copied to clipboard
C++20 ranges trait specializations
As discussed on the discord, here are some quick and dirty specializations for the traits I make use of in my personal code base. I've probably missed some entt ranges, where the traits may also fit.
template <class... Args>
inline constexpr bool std::ranges::enable_borrowed_range<entt::basic_view<Args...>>{true};
template <class... Args>
inline constexpr bool std::ranges::enable_borrowed_range<entt::basic_group<Args...>>{true};
template <class... Args>
inline constexpr bool std::ranges::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
template <class... Args>
inline constexpr bool std::ranges::enable_view<entt::basic_view<Args...>>{true};
template <class... Args>
inline constexpr bool std::ranges::enable_view<entt::basic_group<Args...>>{true};
template <class... Args>
inline constexpr bool std::ranges::enable_view<entt::iterable_adaptor<Args...>>{true};