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

cppinsights.io doesn't show the what is listed in github.com #570

Closed
bramasub1 opened this issue Sep 25, 2023 · 1 comment
Closed

cppinsights.io doesn't show the what is listed in github.com #570

bramasub1 opened this issue Sep 25, 2023 · 1 comment

Comments

@bramasub1
Copy link

This is more of a question than a problem but I am not sure where to ask. I went to cppinsights.io using the link from github. My generated output is shown below. It doesn't have all the compiler generated constructors and destructor. What gives ?

#include
#include
class Base
{
public:
// inline constexpr Base() noexcept = default;
};
class Derived : public Base
{
public:
// inline constexpr Derived() noexcept = default;
};
int main()
{
Derived d;
Base & b = static_cast<Base&>(d);
return 0;
}

@andreasfertig
Copy link
Owner

Hello @bramasub1,

thanks for bringing this up. The compiler seems to have changed a little, such that the output I show in the Readme.md no longer matches. However, the constructors are still there. If you want more of the special member functions, you now have to use them. For example, make a copy of Derived (cppinsights.io/s/8b5b09cf):

class Base {
};

class Derived : public Base {
};

int main() {
  Derived d;
  
  Derived d2 = d;
  Base& b = d;
}

Now, you will see the copy constructor.

Andreas

andreasfertig added a commit that referenced this issue Sep 26, 2023
Fixed #570: Update transformation output shown in `Readme.md`.
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

No branches or pull requests

2 participants