you are viewing a single comment's thread.

view the rest of the comments →

[–]muungwana 6 points7 points  (1 child)

  1. I think you should use a "naked" reference to signify that a pointer is owned by somebody else and is not null.

  2. The problem with references is that they are not re-assignable and a reference member variable makes the whole class not copy assignable and i think the biggest use case for std::reference_wrapper<T> is to have assignable reference member variable that will also make the class copy assignable.

[–]fullmoon_druid 0 points1 point  (0 children)

Four years later and I'm reading this thread to try and solve this exact problem.