entt icon indicating copy to clipboard operation
entt copied to clipboard

C++20 ranges trait specializations

Open DNKpp opened this issue 1 year ago • 0 comments

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};

DNKpp avatar Feb 29 '24 22:02 DNKpp