Boost logo

Boost Users :

From: me22 (me22.ca_at_[hidden])
Date: 2006-06-14 13:49:47


On 6/14/06, Kobi Cohen-Arazi <kobi.cohenarazi_at_[hidden]> wrote:
> On 6/14/06, me22 <me22.ca_at_[hidden]> wrote:
> > Perhaps it's just being "better safe than sorry". It's possible that
> > a problem was noticed on a compiler with faulty ADL or when someone
> > did struct foo : boost::noncopyable { ... }; without thinking of the
> > ADL implications.
>
> Whats wrong with that struct foo : boost::noncopyable { ... }; ? I assume
> that public inheritance will be a problem, or am I missing here something?
>
Nothing is "wrong" with it. However, the public inheritance would
cause ADL to look in the boost namespace if it weren't for the fix
under discussion.

Since boost::noncopyable is a typedef for
boost::noncopyable_::noncopyable, with the fix ADL includes the
boost::noncopyable_ namespace instead of the boost one, which is not
an issue since there are no functions defined in it.

~ Scott McMurray


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net