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

Replace forward declaration of DrawParams with actual declaration #12

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

edelmanjm
Copy link
Contributor

Image uses img::DrawParams() as as default argument; however, the constructor for DrawParams isn't available until the full declaration is available (see https://stackoverflow.com/questions/16857425/forward-declaration-of-class-in-c-incomplete-type). This caused an "invalid use of incomplete type 'img::DrawParams'" error with clang. This resolves that issue.

Image uses img::DrawParams() as as default argument; however, the constructor for DrawParams isn't available until the full declaration is available (see https://stackoverflow.com/questions/16857425/forward-declaration-of-class-in-c-incomplete-type). This caused an "invalid use of incomplete type 'img::DrawParams'" error with clang. This resolves that issue.
@skramm
Copy link
Owner

skramm commented Apr 6, 2024

Thks for your interest, I'll have a look ASAP.
But FWIW, code is currently heavily refactored: removal of class Root, previously needed for run-time polymorphism, and replacement with std::variant. And switch to C+17 required, that will enable constexpress if.
But shouldnt impact your PR.
And yes, I remember I recently added the default value to the draw function, but forgot to add the relevant test...

@edelmanjm
Copy link
Contributor Author

Okay cool, happy to use your refactored version once it's merged; just figured it'd be good to ensure that the master branch can at least build in the meantime, since I don't see a release with svg support yet.

@skramm skramm merged commit a33da0d into skramm:master Apr 6, 2024
5 checks passed
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.

2 participants