the following code compiles with 3.4.4, 4.0-20050430 ---------------------------- namespace element { struct Element {}; void connect( Element* e1, Element* e2 ) {} } // namespace element void foo_connect( element::Element* e1, element::Element* e2 ) { connect(e1,e2); } ---------------------------- Isn't it necessary to open the namespace in foo_connect?
This is how namelookup works for functions. See the whole section in the standard about this, 3.4.2 [basic.lookup.koenig]. The section is named Argument-dependent name lookup.
Reopening to ...
Mark as a dup of bug 7049. *** This bug has been marked as a duplicate of 7049 ***