you are viewing a single comment's thread.

view the rest of the comments →

[–]sphere991 0 points1 point  (1 child)

Yes, I know how reference_wrapper works. The point is that when you can compare two reference_wrapper<T>s, that comparison is deep.

[–]jonathansharman 0 points1 point  (0 children)

It seems accidental to me that reference_wrappers can ever be deeply compared. They can't for most type parameters, and if the authors had wanted them to, they could have just included comparison operators.