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

using box to forward declare? #293

Open
kevin-- opened this issue Oct 8, 2024 · 2 comments
Open

using box to forward declare? #293

kevin-- opened this issue Oct 8, 2024 · 2 comments

Comments

@kevin--
Copy link

kevin-- commented Oct 8, 2024

Our core model of the application is growing quite large, and impacting our compilation time, as every reducer/selector/etc is #include "Model.h"

There is the note about using box to work around incomplete types, so this seemed like a good place to start (change all the includes in the Model.h to be forward declared, as they are already in box's already.
https://sinusoid.es/immer/design.html?highlight=box#recursive-types

But this fails to instantiate as the type is incomplete. Did I misunderstand the use case here? Is there an easy way to support foward-declaration of the model types with immer containers?

@kevin-- kevin-- closed this as completed Oct 16, 2024
@arximboldi
Copy link
Owner

Hi @kevin-- ! How did you solve this in the end?

@kevin--
Copy link
Author

kevin-- commented Nov 9, 2024

Hi @kevin-- ! How did you solve this in the end?

Hi @arximboldi I did not actually solve it, I assumed it was not possible -- am I mistaken?

@kevin-- kevin-- reopened this Nov 9, 2024
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