Possible? Take the following example:
===================
//test1.hpp
namespace B {
typedef int type;
void foo() {}
}
===================
//test.hpp
#include "test1.hpp"
namespace {
using B::type;
using B::foo;
}
namespace A {
void foo(type p) { }
}
#endif
===================
//test.cpp
#include "test.hpp"
int main() {
type a;
A::foo(a);
foo();
}
===================
This compiles (with gnu gcc 4.1.1 at least). I can't seem to figure
out what the standard says about this and why pair can be found even
though its using decl is within an anon namespace.
Given that this doesn't give the desired behavior, is there another
technique that does? (Desired behavior being that type and foo must be
qualified with B:: in test.cpp).
Chris