c++ - Ambiguous reference to symbol
- W這dzimierz Skiba (36/36) Jan 02 2006 Hi!
- vvvua faust.net.ua (18/27) Jan 07 2006 I tryed to compile and everything ok.
- W這dzimierz Skiba (5/9) Jan 08 2006 Sorry, I don't understand your comment :-(
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
Jan 02 2006
In article <dpbe2a$38r$1 digitaldaemon.com>, W這dzimierz 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
Jan 07 2006
vvvua faust.net.ua wrote in news:dpnvrk$2qgs$1 digitaldaemon.com: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. ABXIs that correct?I tryed to compile and everything ok. May be you have to upgrade your gcc.
Jan 08 2006