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

Default arguments break for incomplete struct definitions in input types #282

Merged
merged 5 commits into from
May 8, 2023

Conversation

wravery
Copy link
Contributor

@wravery wravery commented May 8, 2023

On appleClang 12.0, I started seeing build breaks in the NestedInputClient.h sample when compiling the default arguments for the InputABCD struct because it needs to know the size of the elements to default-construct a std::vector<InputBC>, and at that point it had only seen a forward declaration of the struct.

I replaced the default arguments in the explicit constructor with another explicit default constructor. This can potentially break code which passes some but not all arguments to the constructor, but it works with any callers who either specified all or none of the parameters before.

@wravery wravery self-assigned this May 8, 2023
@wravery wravery merged commit 2382a49 into microsoft:main May 8, 2023
@wravery wravery deleted the mac-build-fix branch May 8, 2023 17:22
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

Successfully merging this pull request may close these issues.

1 participant