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

M-SHARED pointer cannot use forward-declared type #129

Open
BrianSipos opened this issue Sep 12, 2024 · 1 comment
Open

M-SHARED pointer cannot use forward-declared type #129

BrianSipos opened this issue Sep 12, 2024 · 1 comment

Comments

@BrianSipos
Copy link

I have a need for a managed-lifetime struct with recursive references, so I was hoping to be able to use the M-SHARED container to implement this but it appears that M-SHARED requires a fully-defined struct due to its optimization using the "combine_s" struct.

It could be good to include this detail in the README interface documentation. If there could be a way to avoid the use of that combine mechanism for forward declared structs that would be helpful in the longer-term.

@P-p-H-d
Copy link
Owner

P-p-H-d commented Sep 12, 2024

The definition of the combine_s structure can easily be deactivated if the INIT and EMPLACE_TYPE operators are disabled (This will prevent the definition of _init_new and the _emplace functions). Is such change sufficient for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants