home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 33,134 of 33,346   
   =?UTF-8?B?Sm9zaHVhIENyYW5tZXIg8J+Qp to heideggm@googlemail.com   
   Re: What is necessary to make a template   
   22 Jul 13 10:17:16   
   
   From: Pidgeot18@verizon.invalid   
      
   On 7/21/2013 9:57 PM, heideggm@googlemail.com wrote:   
   > Now I create an instance of DerivedClass and call myOtherMethod from it.   
   > The compiler complaints that he cannot find myMethod in myOtherMethod   
   > and wants me to use the this pointer.   
      
   >From C++11:   
   In the definition of a class or class template, if a base class depends   
   on a template-parameter, the base class scope is not examined during   
   unqualified name lookup either at the point of definition of the class   
   template or member or during an instantiation of the class template or   
   member.   
      
   So, in short, if the base needs a template parameter, then all   
   references to members of that base need to be fully qualified in the   
   derived class.   
      
   --   
   Beware of bugs in the above code; I have only proved it correct, not   
   tried it. -- Donald E. Knuth   
      
      
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca