Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2004-04-15 15:01:55


Hi there

>From intrusive_ptr.html:
<quote>
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.
</quote>

It's the last 8 words that don't make much sense to me. That would force
some libraries using intrusive_ptr to make using declarations or directives
in headers.

IMHO there's no other choice but to put the two functions in the global
namespace for compilers that do not support ADL. What am I missing?

Thanks & Regards,

Andreas


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