|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-27 09:02:33
David Abrahams wrote:
> > namespace boost
> > {
> > template<int I> class arg {};
> > }
> >
> > namespace mpl_
> > {
> > template< int N > struct arg {};
> > }
> >
> > namespace boost { namespace mpl {
> >
> > using namespace mpl_;
> >
> > template<typename ForwardOp = arg<1> >
> > struct XXX
> > {
> >
> > IIRC, the 'arg' visible via using is considered to be declared in the
> > nearest namespace enclosing both mpl_ and boost::mpl -- which is global
> > namespace. So boost::arg hides mpl_::arg. For explicit mpl::aux, the name
> > lookup ignores the 'boost' namespace.
>
> But the fact that explicit qualification doesn't fix it is surely a
> bug?
Not sure. Explicit qualification fixed the above snippet -- the gcc correctly
used mpl::arg<1>, instead of boost::arg<1>. However, as
Joaquín noted, there were some other cases where unqualified arg was used and
they had to be fixed too.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk