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

Introduce implicit cast operators for vk::UniqueHandles, vk::SharedHandles and vk::raii::Handles #1771

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

asuessenbach
Copy link
Contributor

Add an implicit cast for the vk::UniqueHandles and the vk::SharedHandles, "hidden" by the define VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST. Those two handle wrapper are semantically very close to the corresponding pointer types and thus the implicit cast is not a perfect fit. Making it available by an opt-in seems to be reasonable.
The vk::raii::Handles, on the other hand, are more a non-pointer wrapper, and thus get the implicit-cast unconditionally.

Resolves #1731.

@asuessenbach asuessenbach merged commit 3e6fed9 into KhronosGroup:main Jan 16, 2024
12 checks passed
@asuessenbach asuessenbach deleted the implicit_cast branch January 16, 2024 12:48
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.

Add feature macro to allow implicit cast of UniqueHandle to hpp handles
1 participant