Click here to Skip to main content
15,886,067 members
Articles / Desktop Programming / WTL

XONOR pointers: eXclusive Ownership & Non Owning Reference pointers

Rate me:
Please Sign up or sign in to vote.
4.96/5 (46 votes)
14 Apr 2014CPOL41 min read 126.3K   691   88  
A smart pointer system for safe application development in C++.
#pragma once

namespace XonorPtrs {

//owner_ptr collections DO NOT WORK with STL collections

//strong_ptr collections
template <class T> class strong_ptr_list : public list<strong_ptr<T> >
{
};

template <class T> class strong_ptr_array :  public vector<strong_ptr<T> >
{

};

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

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