Open ytimenkov opened 3 years ago
I've started playing with with ranges and C++20 and came to the similar problem as in #1400 But I did:
namespace ranges { template <> inline constexpr bool enable_borrowed_range<std::filesystem::directory_iterator> = true; }
Which allows me to write and compile code like this: (gcc 10.2, Linux):
fs::directory_iterator{"/home"} | views::filter([](fs::directory_entry const& e) { return e.is_directory(); });
Why this is not enabled by default?
Maybe related https://cplusplus.github.io/LWG/issue3480.
@BRevzin Sorry that I ping you, but what are your thoughts on this?
I've started playing with with ranges and C++20 and came to the similar problem as in #1400 But I did:
Which allows me to write and compile code like this: (gcc 10.2, Linux):
Why this is not enabled by default?