Date: Mon, 20 Apr 2020 11:01:23 +0300
Barry Revzin via Std-Proposals:
> It's actually somewhat worse than this. span used to have comparison
> operators, and then people fought to remove them.
Because it should be shallow comparison or no comparison at all. span is like a "fat" pointer, it doesn't own the data and data
can change at any time. Having deep comparisons would make a lot of very unsafe code compile.
I would say that std::basic_string_view should also have its comparison operators removed for the same reason.
> It's actually somewhat worse than this. span used to have comparison
> operators, and then people fought to remove them.
Because it should be shallow comparison or no comparison at all. span is like a "fat" pointer, it doesn't own the data and data
can change at any time. Having deep comparisons would make a lot of very unsafe code compile.
I would say that std::basic_string_view should also have its comparison operators removed for the same reason.
Received on 2020-04-20 03:04:31