$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-04-16 06:22:55
Andreas Huber wrote:
> 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.
Why would it do that?
> 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?
The global namespace can only work if there are no shadowing declarations in
namespace boost.