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,311 of 33,346   
   red floyd to red floyd   
   Re: Is this use of the keyword struct in   
   17 Apr 14 16:41:35   
   
   From: no.spam.here@its.invalid   
      
   On 4/17/2014 11:36 AM, red floyd wrote:   
   > On 4/17/2014 5:26 AM, marcel.loose@googlemail.com wrote:   
   >> Hi all,   
   >>   
   >> I bumped into a compilation error with GCC 4.8 with the following code:   
   >>   
   >> $ cat t.cc   
   >> class B   
   >> {   
   >> protected:   
   >>   struct S {};   
   >>   virtual void doIt(struct S& s) = 0;   
   >> };   
   >>   
   >> class D : public B   
   >> {   
   >> public:   
   >>   using B::S;   
   >>   virtual void doIt(struct S& s);   
   >> };   
   >>   
   >> void D::doIt(struct S& s)   
   >> {   
   >>   (void)s;   
   >> }   
   >>   
   >   
   > I'm not sure what the actual problem is, but I'd like to point out that   
   > the "using B::S" is unnecessary.   
   >   
   >   
   Correction.  It looks like the intent of the using statement is to make   
   D::S public.   
      
      
   --   
         [ 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