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

CRTP Factory with less copy-paste segmentation fault #3

Open
MhmRhm opened this issue Mar 28, 2024 · 0 comments
Open

CRTP Factory with less copy-paste segmentation fault #3

MhmRhm opened this issue Mar 28, 2024 · 0 comments

Comments

@MhmRhm
Copy link

MhmRhm commented Mar 28, 2024

While running the code on Chapter 13 Page 288 I get a Segmentation fault (core dumped) for my class that inherits from Drived.
The whole point of this code is that I can leverage this design for deep hierarchies as stated in the book:

However, should the enlightened self-interest prove insufficient to the cause, another variant of the CRTP factory can be employed to reduce copy-pasting, even in deep hierarchies:

You can find my implementation at this repository.

Screenshot 2024-03-28 at 6 14 29 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant