From: Grzegorz J. <ja...@he...> - 2003-08-11 03:12:53
|
On Mon, 4 Aug 2003, yang qu wrote: > Hi! > I believe the problem comes from "Template Specilization". In the code > that I attached, the template class Buffer has a general declaration > and a specialized declaration. the class "IntBuffer" has two parents > classes. one is the specialized "Buffer", and another is the normal > class "TestObject". The occ failed when it detected that the two > parent classes have different Metaclass names, namely "TemplateClass" > and "Class". Yes. > should this bug be fixed somehow? Yes, but I don't see any quick fix. If you would like to get down to this I can advice where to look etc. Best regards Grzegorz > best regards > --yang > > --------------------------------- a simple test code ---------------------- > > class Mem{ > > public: > > virtual int name() =0; > > }; > > template<class C> class Buffer : virtual public Mem{ > > public: > > int name(){return 0;} > > C get(int); > > void set(C, int); > > int size(); > > private: > > C data[10]; > > }; > > > > template<> class Buffer<int>: virtual public Mem{ > > public: > > int name(){return 1;}; > > int get(int); > > void set(int,int); > > int size(); > > private: > > int data[10]; > > }; > > class BasicObject{ > > }; > > class TestObject : public BasicObject{ > > public: > > virtual int type(){return 1;} > > }; > > class IntBuffer : public Buffer<int>, public TestObject{ > > public: > > int type(){return 10;} > > }; > --------------------------------------------------- > > Grzegorz Jakacki <ja...@he...> wrote: > On Fri, 1 Aug 2003, yang qu wrote: > > > Hi! > > when I was applying the openc++ on a set of regular > > C++ codes that can be successfully compiled using > > gcc3.2, I got the following error message: "inherited > > metaclasses conflict: test_class". the "test_class" > > and all of its parents classes are regular C++ > > classes. No meta-level classes are defined in the > > codes. Could someone tells me what might cause the > > problem? > > Could you post the offending code (preferably stripped from irrelevant > details)? > > BR > Grzegorz > > > thank you in advance! > > best regards > > --yang > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > > Opencxx-users mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > > > > > ################################################################## > # Grzegorz Jakacki Huada Electronic Design # > # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # > # tel. +86-10-64365577 x2074 Beijing 100015, China # > # Copyright (C) 2002 Grzegorz Jakacki, HED. All Rights Reserved. # > ################################################################## > > > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2002 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |