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

Figure out default construction and brace-initialization of C++ structs #271

Open
Manishearth opened this issue Oct 17, 2022 · 1 comment
Labels
B-cpp C++ backend bug Something isn't working enhancement New feature or request
Milestone

Comments

@Manishearth
Copy link
Contributor

See unicode-org/icu4x#2522

This is related to #247

These structs have default ctors; which create uninitialized memory. We shouldn't do that, and we should ask people to = {} instead.

We probably want to delete the default ctor; however it's also necessary for brace initialization (Foo foo = {.bar = ..., .baz = ...}).

Ideally we can hook this into #247 so that a default ctor is generated when all children have a default value.

@Manishearth Manishearth added bug Something isn't working enhancement New feature or request labels Oct 17, 2022
@Manishearth
Copy link
Contributor Author

cc @sffc who has been working on the C++ backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-cpp C++ backend bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant