-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement LWG-3480, directory_iterator
and recursive_directory_iterator
are ranges
#2340
Conversation
inline constexpr bool enable_view<filesystem::recursive_directory_iterator> = true; | ||
} // namespace ranges | ||
#endif // __cpp_lib_concepts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hint to other reviewers: our end
overloads for directory_iterator
and recursive_directory_iterator
already take their argument by value as in the proposed resolution of LWG-3480. In fact they always have, all the way back to MSVC-PR-108103! I'll have to thank Gor for realizing that WG21 would want to change these 3.5 years later =)
[No change requested.]
inline constexpr bool enable_view<filesystem::recursive_directory_iterator> = true; | ||
} // namespace ranges | ||
#endif // __cpp_lib_concepts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change requested, noting for the record: These explicit specializations work because the primary templates are defined in <xutility>
:
Lines 1972 to 1973 in 3c2fd04
template <class> | |
inline constexpr bool enable_borrowed_range = false; |
Lines 2696 to 2698 in 3c2fd04
template <class _Ty> | |
inline constexpr bool enable_view = | |
derived_from<_Ty, view_base> || _Derived_from_specialization_of<_Ty, view_interface>; |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for range-ifying these iterators and getting the codebase closer to zero LWG issues! 😸 🚀 🎉 |
Fixes #2315