unique_ptr, shared_ptr, weak_ptr, or reference_wrapper for class relationships -- Hitesh Kumar

Save to:
Instapaper Pocket Readability

Expressing class relationships with unique_ptr, shared_ptr, weak_ptr, and reference_wrapper.

unique_ptr, shared_ptr, weak_ptr, or reference_wrapper for class relationships

by Hitesh Kumar

From the article:

Classes communicate with each other by having handles as members that refer to other classes. The choice of those referring-handles (e.g., pointers or references) is mostly driven by ownership or control-over-lifetime semantics.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.