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

Subclass Sandbox Suggestion #380

Open
matthewPapageorge opened this issue Oct 31, 2023 · 0 comments
Open

Subclass Sandbox Suggestion #380

matthewPapageorge opened this issue Oct 31, 2023 · 0 comments

Comments

@matthewPapageorge
Copy link

In the Design Decisions subsection under "How does the base class get the state that it needs", it is suggested to use two stage initialization. It would be beneficial to point out that one need not create a factory method for each subclass. One could simply create a single template function returning a SuperPower*, enabling you to have a single function to create every SuperPower.

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

1 participant