Thread overview | |||||
---|---|---|---|---|---|
|
January 02, 2006 Ambiguous reference to symbol | ||||
---|---|---|---|---|
| ||||
Hi! Using below code I'm getting: test.cpp(20) : Error: ambiguous reference to symbol Had: tmCluster::GetParts() and: tmCluster::GetParts()const test.cpp(27) : Error: ambiguous reference to symbol Had: tmCluster::GetParts() and: tmCluster::GetParts()const Is that correct? ========================================================== class tmNode{}; template <class T> class tmDpptrArray { typedef T* ptr_t; }; class tmCluster { public: tmDpptrArray<tmNode> mNodes; template <class P> tmDpptrArray<P>& GetParts(); template <class P> const tmDpptrArray<P>& GetParts() const; }; template <> inline tmDpptrArray<tmNode>& tmCluster::GetParts<tmNode>() { return mNodes; } template <> inline const tmDpptrArray<tmNode>& tmCluster::GetParts<tmNode>() const { return mNodes; } ========================================================== ABX |
January 07, 2006 Re: Ambiguous reference to symbol | ||||
---|---|---|---|---|
| ||||
Posted in reply to W³odzimierz Skiba | In article <dpbe2a$38r$1@digitaldaemon.com>, W³odzimierz Skiba says... > >Hi! > >Using below code I'm getting: > > test.cpp(20) : Error: ambiguous reference to symbol > Had: tmCluster::GetParts() > and: tmCluster::GetParts()const > test.cpp(27) : Error: ambiguous reference to symbol > Had: tmCluster::GetParts() > and: tmCluster::GetParts()const > >Is that correct? I tryed to compile and everything ok. May be you have to upgrade your gcc. vvvua@mhost:~/tmp$ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib--without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=releasei486-linux-gnu Thread model: posix gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5) vvvua@mhost:~/tmp$ Vladimir |
January 08, 2006 Re: Ambiguous reference to symbol | ||||
---|---|---|---|---|
| ||||
Posted in reply to vvvua | vvvua@faust.net.ua wrote in news:dpnvrk$2qgs$1@digitaldaemon.com: > > Is that correct? > > I tryed to compile and everything ok. > May be you have to upgrade your gcc. Sorry, I don't understand your comment :-( I was reporting build problem in DMC. GCC, Borland, and VC eats that code silently. Comeau on-line compiled this code as well. ABX |
Copyright © 1999-2021 by the D Language Foundation