|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - namespaces and -Error: ambiguous reference to symbol
Similar to what STLport does to pull global functions into std::
//test.cpp - test namespace
//global function
void testfunc(void){}
//pull into namespace
namespace myname{
using ::testfunc;
};
//use in namespace
namespace myname{
void func(void){
testfunc(); // Error: ambiguous reference to symbol
}
};
int main(void){
myname::func();
return 1;
};
output:
Apr 16 2002
DMC doesn't do the so-called "Koenig lookup" on namespaces. It will, but until then, probably the easiest thing is to use the STL included with DMC. "Tom Lowe" <talowe tmynetplus.com> wrote in message news:a9inco$1acd$2 digitaldaemon.com... Apr 16 2002
"Walter" <walter digitalmars.com> wrote in message news:a9j2vh$2h7f$1 digitaldaemon.com...DMC doesn't do the so-called "Koenig lookup" on namespaces. It will, but until then, probably the easiest thing is to use the STL included with Apr 17 2002
|