Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++20 ranges trait specializations #1119

Open
DNKpp opened this issue Feb 29, 2024 · 0 comments
Open

C++20 ranges trait specializations #1119

DNKpp opened this issue Feb 29, 2024 · 0 comments
Assignees
Labels
enhancement accepted requests, sooner or later I'll do it

Comments

@DNKpp
Copy link
Contributor

DNKpp commented Feb 29, 2024

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};
@skypjack skypjack self-assigned this Mar 1, 2024
@skypjack skypjack added the enhancement accepted requests, sooner or later I'll do it label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement accepted requests, sooner or later I'll do it
Projects
None yet
Development

No branches or pull requests

2 participants