Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual inheritance is lost #236

Closed
Quuxplusone opened this issue Sep 28, 2019 · 1 comment
Closed

Virtual inheritance is lost #236

Quuxplusone opened this issue Sep 28, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Quuxplusone
Copy link

As of this writing,

struct S {};
class T : virtual S {};

is transformed into

struct S
{
  // inline constexpr S & operator=(const S &) = default;
  // inline constexpr S & operator=(S &&) = default;
  // inline ~S() = default;
};

class T : private S
{
  public: 
  // inline T & operator=(const T &) = default;
  // inline T & operator=(T &&) = default;
  // inline ~T() = default;
};

which loses the "virtual" part of the virtual inheritance.

@andreasfertig
Copy link
Owner

Hello @Quuxplusone,

thank you for pointing that out. It slipped under my radar. A fix is on its way.

Andreas

@andreasfertig andreasfertig added the bug Something isn't working label Sep 29, 2019
andreasfertig added a commit that referenced this issue Sep 29, 2019
Fixed #236: Add missing virtual specifier for virtual inheritance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants