Open sergegers opened 2 years ago
@ericniebler pls, leave a comment. Did I make a mistake in my conclusions?
You're correct. The solution is to use the back_inserter from range-v3, and to wait for Microsoft to update its back_inserter implementation for C++20.
Range-v3 hasn't adopted https://github.com/cplusplus/draft/commit/479c6a8f333fa8ea6fac11563d715f0cba376d82#diff-0043c904d3e034a77b44feeddf18719e63e646d55db1c564f2a5defe7330c9eaL1321 nor its previous relaxation, as seen at https://github.com/ericniebler/range-v3/blob/master/include/range/v3/iterator/concepts.hpp#L257. My guess is that some wrongly hard-coded logic made Range-v3 fall back to using its own concepts due to not detecting that your implementation still provides them.
So you are waiting when P2325R3 leaks in production compiler. Thank you @ericniebler , @JohelEGP .
You're correct. The solution is to use the back_inserter from range-v3, and to wait for Microsoft to update its back_inserter implementation for C++20.
what is the current status of weakly_incrementable
? c++20 version seems to require default_initializable
, but the current working draft removes the requirement
From https://github.com/cplusplus/papers/issues/1007
with the recommendation that implementations retroactively apply it to C++20.
with the recommendation that implementations retroactively apply it to C++20.
what does this "it" refer to? apply "P2325R2" or apply "default_constructible" ? apply "P2325R2" means that the implementation should remove the need for default_constructible for C++20 as well?
Yes, the paper itself.
Range-v3 hasn't kept up with the changes made in std::ranges
. This is mostly because I lack time. Patches welcome.
After upgrading Visual Studio to 2022 Preview 3 the following code is failed
As I can see the compilation is failed because std::back_insert_iterator<std::vector> doesn't satisfy concept weakly_incrementable -> semiregular -> default_constructible. But back_insert_iterator is not default constructible! How did it work before? Anyway it looks like a bug.
The code with STL range implementation works fine
because weakly_incrementable implementation is look like
and doesn't require default construction.