1

I'm looking at cppreference for std::owner_less: It says:

The order is such that two smart pointers compare equivalent only if they are both empty or if they share ownership, even if the values of the raw pointers obtained by get() are different (e.g. because they point at different subobjects within the same object).

But how could share ownership, even if the values of the raw pointers obtained by get() are different?

Any real-world case that could produce this result?

cigien
  • 57,834
  • 11
  • 73
  • 112
Immanuel Kant
  • 517
  • 3
  • 8

0 Answers0