#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Iowa
    Posts
    1
    Rep Power
    0

    Question Multiple Inheritance Naming Issues with gcc2.9x


    I have some C++ code that has a structure something like this:

    class Base1{}
    class Base2{}

    class Intermediate : Base1{}
    class Intermediate : Base2{}

    class Top : Base1::Intermediate, Base2::Intermediate{}

    I have heard that gcc has issues with this multiple inheritance, because it does not handle the namespace/scope resolution correctly and sees both "Intermediate" classes as the same class, which of course they're not.

    Is this something that has been resolved in newer versions of gcc? Anyone know of any references to a problem like this (I looked, but couldn't find much in my brief search)?

    Thanks for your help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2001
    Posts
    1,481
    Rep Power
    15
    "I have heard that gcc has issues with this multiple inheritance."

    Why don't you create 5 simple classes and test it out?

IMN logo majestic logo threadwatch logo seochat tools logo