Click here to Skip to main content
15,887,776 members
Articles / Desktop Programming / MFC

Smart observers to use with unique_ptr

Rate me:
Please Sign up or sign in to vote.
4.77/5 (14 votes)
18 Sep 2015CPOL27 min read 20.9K   203   25  
observer_ptr<T>, a smart observer guaranteed to always be either valid or test as null. Transparently harnessing unique_ptr<T>'s custom deleter feature to detect object destruction.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
Spain Spain
Software Author with engineering, science and mathematical background.

Many years using C++ to develop responsive visualisations of fine grained dynamic information largely in the fields of public transport and supply logistics. Currently interested in what can be done to make the use of C++ cleaner, safer, and more comfortable.

Comments and Discussions