
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