Re: [bug] typedefed base class not visible [VC8 RTM.050727-4200]

Tech-Archive recommends: Speed Up your PC by fixing your registry



Fernando Cacciola wrote:

I'm getting lots of errors on code that compiled fine in 7.1.
Most of it boils down to the following new compiler bug:

struct A
{
  int foo() const { return 1; }
};

struct B : A
{
  typedef A base ;
};

I think the new compiler is right, 7.1 is wrong, and the problem is in your code. You're doing private inheritance. By writing


struct B : A

you are essencially making foo() invisible. You should try

struct B : public A

Tom
.



Relevant Pages

  • Re: [Starfall/ACRA] Metal Fire #10, False Maria 04
    ... Because of teh time between writing issue nine and writing ... The wrapping up of this arc, ... elements Tom encountered in issue seven. ... "look, I'm trying to be clever and set something ...
    (rec.arts.comics.creative)
  • Re: Sizes of Integer Types
    ... Portability is not a black-and-white thing. ... Writing a typedef for an unsigned type that's exactly 32 bits wide ... with no padding bits isn't terribly difficult, ...
    (comp.lang.c)
  • Re: Islamophobia
    ... writing, is what I do. ... edit other peoples writings. ... What's not to understand, nickhead? ... accused Tom of not being able to correctly compose the sentence he wrote. ...
    (misc.news.internet.discuss)
  • Re: Islamophobia
    ... writing, is what I do. ... You truly don't understand the English language and yet you claim to edit other peoples writings. ... Being a writer of your egoistic self evaluating stature, I would think it would be a simple thing for you to do since you accused Tom of not being able to correctly compose the sentence he wrote. ...
    (misc.news.internet.discuss)
  • Re: Character Ownership
    ... >>have carpal tunnel and have to cut back on your writing. ... >>mention you are also writing a Terminator novel. ... Tom ...
    (rec.arts.sf.written)