KhronosGroup / Vulkan-Hpp

Open-Source Vulkan C++ API
Apache License 2.0
3.12k stars 305 forks source link

Add move semantics for non-raii hpp handles. (#1919) #1923

Closed siukosev closed 3 months ago

siukosev commented 3 months ago

Added define VULKAN_HPP_HANDLES_MOVE_EXCHANGE which enables exchange in handles' move-constructors. Moved exchange from raii to root vk namespace.

closes #1919

siukosev commented 3 months ago

Had issues with codegen: clang-format makes too much redundant changes to existing headers. I suppose it's because of newer version(16 or 18). Tell me if I have to install clang-format 15 for correct behavior.

asuessenbach commented 3 months ago

Great PR, thank you!

Would be perfect if you could use clang-format 15 and also add the generated files, but I would also accept your change as is... But please adjust the year in the copyright header in the two new files, and the comment about ArrayProxy in the test. Also, I don't get why you check agains nullptr there in two directions?

siukosev commented 3 months ago

Two directions nullptr check: it was a copy-paste from Handles test. I will remove redundant checks.

siukosev commented 3 months ago

Successfully reproduced build env. Will update PR after 1.3.291 headers pipeline completion

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

asuessenbach commented 3 months ago

Looks great now, thanks a lot for your contribution.