Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / May 2005



Tip: Looking for answers? Try searching our database.

c++ bug, inner template class access rights

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sailesh  A - 25 May 2005 21:00 GMT
The example below compiles fine if the inner class is not a template
class. It also compiles perfectly on gcc. I think this is a bug in
CodeWarrior's C++ compiler.

class Foo
{
private:
  void foo_func() { }

  class BarPrivate
  {
     public:
        virtual void execute() = 0;
  };

public:
  template<class QueryType>
  class BarPublic : public BarPrivate
  {
     public:
        void execute()
        {
           Foo * stub;
           stub->foo_func();
        }
  };
};

class Reecha{ };

int main()
{
  Foo::BarPublic<Reecha>* command = new Foo::BarPublic<Reecha>();
   return 1;
}
Alexander Dymerets - 26 May 2005 08:20 GMT
Sailesh A wrote:

> The example below compiles fine if the inner class is not a template
This code should not compile at any case.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.