intrusive_ptr class template

The intrusive_ptr class template stores a pointer to an object with an
embedded reference count. Every new intrusive_ptr instance increments
the reference count by using an unqualified call to the function intrusive_ptr_add_ref,
passing it the pointer as an argument. Similarly, when an intrusive_ptr
is destroyed, it calls intrusive_ptr_release; this function is
responsible for destroying the object when its reference count drops to zero.
The user is expected to provide suitable definitions of these two functions. On
compilers that support argument-dependent lookup, intrusive_ptr_add_ref
and intrusive_ptr_release should be defined in the namespace
that corresponds to their parameter; otherwise, the definitions need to go in
namespace boost. The library provides a helper base class template
intrusive_ref_counter which may
help adding support for intrusive_ptr to user's types.

The class template is parameterized on T, the type of the object pointed
to. intrusive_ptr<T> can be implicitly converted to intrusive_ptr<U>
whenever T* can be implicitly converted to U*.

Returns: an unspecified value that, when used in boolean contexts, is
equivalent to get() != 0.

Throws: nothing.

Notes: This conversion operator allows intrusive_ptr objects to be
used in boolean contexts, like if (p && p->valid()) {}.
The actual target type is typically a pointer to a member function, avoiding
many of the implicit conversion pitfalls.