Skip to content

Conversation

@praetorian20
Copy link
Contributor

core_class_hierarchy.hpp contains classes with the following
inheritance hierarchy

derived_private_t -> base_t
multi_derived_t   -> derived_private_t, base_t

Since multi_derived_t contains base_t as a direct base and as a base
via derived_private_t, this creates warnings about base_t being
inaccessible because it's ambiguous which base_t instance is being
referred to.

Changed the inheritance hierarchy to virtual inheritance so that
derived_private_t and multi_derived_t inherit base_t virtually. Now
there's only a single instance of base_t in multi_derived_t and the
warning is avoided.

Fixes #46

Change-Id: I3a52a666460bea2cc3c66b1855288d757f93f507

`core_class_hierarchy.hpp` contains classes with the following
inheritance hierarchy

    derived_private_t -> base_t
    multi_derived_t   -> derived_private_t, base_t

Since `multi_derived_t` contains `base_t` as a direct base and as a base
via `derived_private_t`, this creates warnings about `base_t` being
inaccessible because it's ambiguous which `base_t` instance is being
referred to.

Changed the inheritance hierarchy to `virtual` inheritance so that
`derived_private_t` and `multi_derived_t` inheri `base_t` virtually. Now
there's only a single instance of `base_t` in `multi_derived_t` and the
warning is avoided.

Fixes CastXML#46

Change-Id: I3a52a666460bea2cc3c66b1855288d757f93f507
@praetorian20
Copy link
Contributor Author

Just ignore this for a day. CI is failing because some fixes for CastXML from #35 are missing. Once you merge that, I'll rebase this and it'll pass.

@iMichka iMichka merged commit 04c6f55 into CastXML:develop Apr 26, 2016
@iMichka
Copy link
Collaborator

iMichka commented Apr 26, 2016

It's ok; the two things are unrelated and this patch was good to go. Further builds on the develop branch should be green once #35 is done. Do not forget to squash/rebase #35 so I can merge it too.

Thanks for the fix !

@praetorian20
Copy link
Contributor Author

I've already squashed #35, forgot to comment that I did that.

@praetorian20 praetorian20 deleted the issue_46_inaccessible_base_warning branch April 26, 2016 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants