[ MilošV @ 22.12.2003. 20:28 ] @
Prenosim sa borland.public.cppbuilder.language foruma... Nista mi nije jasno :( Citat: Hi all, I just wanted to get people's thoughts on a compile error I'm seeing with C++Builder6. I've been working with the libraries in the Crystal Space open source project (http://crystal.sourceforge.net). Here's the context the error appears in, and the specific error is 'Destructor name must match class name'. Code: template <class T> class csArrayElementHandler { public: static void Construct (T* address, T const& src) { new (static_cast<void*>(address)) T(src); } static void Destroy (T* address) { address->T::~T(); [blue]// <-- Here's where the error occurs[/blue] } static void InitRegion (T* address, int count) { for (int i = 0 ; i < count ; i++) Construct (address + i, T ()); } }; This code is in /include/csutil/array.h in case you're tempted to peruse the cvs repository. I have it on pretty good authority (one of the Crystal Space authors) that this code compiles just fine on every other modern compiler he knows of, but Builder won't compile it. Da li tip zna nešto za što ja nisam čuo ili mu treba poslati Leku da mu objasni par stvari o životu? :) Ili oboje? :) |