ericniebler / range-v3

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

different result for range move with std #1740

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi, Is the result difference expected?

godbolt

Cheers

JohelEGP commented 1 year ago

No. It's a bug.

JohelEGP commented 1 year ago

A bug in your code. See https://en.cppreference.com/w/cpp/algorithm/ranges/move.

The behavior is undefined if result is within the range [first, last).

ghost commented 1 year ago

Right, missed that one thanks!