Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-03-06 15:03:35


"gavin collings" <gcolling-_at_[hidden]> wrote:
> Since the interfaces will be as identical as possible, naming by
> implementation probably makes more sense. Change shared_ptr to
> counted_ptr?

Well, if we can get interfaces to match, then we could do something
like:

#if defined( _LINKED_IMPL_ )
  template<class T> shared_ptr : public linked_ptr<T> {};
#elif defined ( _COUNTED_IMPL_ )
  template<class T> shared_ptr : public counted_ptr<T> {};
#else
  // default implementation; something we chose...
  ...
#endif

This way, with a simple configuration define, you can change your smart
pointer implementation globally.

Cheers,

Miki.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk