
Vladimir Prus ha escrito:
Joaqu?n M? L?pez Mu?oz wrote:
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.
Never heard of that rule. Do you happen to know where in the std can I learn more about it?
The first rule is 7.3.4/1: During unqualified name lookup, names appear as if they were declared in the nearest enclosing namespace which contains both the using-directive and the nominated namespace.
The second rule is 3.4.3.2/2: Given X::m ... let S be the set of all declarations of m in X and the the transitive closure of all namespaces nominated by using directives in X ... So, for mpl::X, only mpl and mpl_ are searched, but not boost.
Man, and I thought I knew C++. Thanks for the pointer! Joaquín M López Muñoz Telefónica, Investigación y Desarrollo