Why does a string_view comparison not consider equal memory addresses

Viewed 94

As the title states.

Why does a std::string_view comparison not consider equal memory addresses.

According to the standard and equally the implementation of MSVC's STL implementation which I checked. When comparing two string views, the possibility of them referencing the same string in memory appears to be ignored and their content gets compared anyway.

Why is it not considered to test if they do reference the same string?

0 Answers
Related