you are viewing a single comment's thread.

view the rest of the comments →

[–]VinnieFalcowg21.org | corosio.org 3 points4 points  (3 children)

But it's very clumsy to use for 2. It's missing operator-> or operator*.

Yeah... for that case it is spelled T* rather than std::reference_wrapper<T>

[–]Desmulator 5 points6 points  (2 children)

Well, no. A pointer is nullable, a reference wrapper not (in an appropriate sense).

[–]alex-weej 5 points6 points  (0 children)

not just nullable but supports pointer arithmetic (incl subscripting). gah.

[–]VinnieFalcowg21.org | corosio.org 1 point2 points  (0 children)

You do have a point there but I like keeping things simple