Boost logo

Boost Users :

From: Jason Winnebeck (yg-boost-users_at_[hidden])
Date: 2003-08-13 07:11:53

Peter Dimov wrote:
> General "minimal but complete" principles, I guess. It is much easier to add
> a feature to a standard component at a later time than to take one away, and
> we already have to support if( p ) for declarations in conditions to work.

I already abstract away the choice of boost::shared_ptr behind my own
symbol, partly because someday I wanted to use perhaps an intrusive
pointer instead and deriving from a common base class. Because there
are no template typedefs :( I had to do this by inheriting my class from

I wonder if it would be "distasteful" in any way to provide an operator
==( int ) and a similar for !=?

bool GNE::SmartPtr<T>::operator == ( int rhs ) {
   assert( rhs == 0 );
   return ( *this );

(Yes I know there is another class called SmartPtr in existance -- I
found that out later. But that's why we have namespaces, no?)


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at