ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.11k stars 440 forks source link

Partial implementation of P2325 #1709

Closed brevzin closed 2 years ago

brevzin commented 2 years ago

Fixes #1707.

This is a partial implementation, in that I'm removing the requirements of default construction from the concepts and removing the partially-formed default constructors that I removed in that paper. I didn't go through and properly constrain the default constructors of all the adaptors (some might be okay, others not, it's kind of annoying that T member; for non-default-constructible T does delete the default constructor, but T member = T(); does not... unless you're gcc) nor try to optimize the adaptors to use a new copyable_box instead of a semiregular_box.

This also isn't thoroughly tested, but because ref_view is no longer default constructible and lots of adaptor tests do use it, that should have exposed some issues if they existed.

brevzin commented 2 years ago

and removing the partially-formed default constructors that I removed in that paper

This will break code needlessly (IMO). I would prefer that part of the change to be backed out. Apologies for the churn.

Sure, that seems reasonable.