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

Feature request: Add move semantics to Document type #135

Closed
miss-programgamer opened this issue Jul 15, 2023 · 1 comment
Closed

Feature request: Add move semantics to Document type #135

miss-programgamer opened this issue Jul 15, 2023 · 1 comment

Comments

@miss-programgamer
Copy link

Once a document has been created, I'd like to be able to store it somewhere without having to use a unique pointer. If the Document class had move semantics, I would be able to simply transfer it to my own storage, but it currently doesn't

The reason why is because its default constructor is private, meaning the default move constructor is also marked private by default. The fix would be as simple as adding a public Document(Document&&) noexcept; to the Document class in lunasvg.h and lunasvg::Document::Document(Document&&) noexcept = default; in lunasvg.cpp, so please consider this small improvement.

@sammycage
Copy link
Owner

I appreciate your suggestion and will carefully review it to determine its suitability for integration into the codebase. Thank you for dedicating your time to report the issue and offer a potential solution.

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