From 082f7a6c3aa086829a79347cdc2bef72a324e566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 18 Dec 2020 21:14:04 +0100 Subject: [PATCH] doc: rules for move-only CreateInfo wrappers. --- doc/developers.dox | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/developers.dox b/doc/developers.dox index 6ab8fa9e2..6b34d4be4 100644 --- a/doc/developers.dox +++ b/doc/developers.dox @@ -804,6 +804,12 @@ unless it doesn't affect public API at all. directly in `vkCreate*()` APIs (or alternatively returning a reference, if the structure is commonly used in arrays as is the case with @ref Vk::AttachmentReference for example) +- Classes should be implicitly copyable, with no copy/move constructors, + destructor or copy/move assignments listed. If a class needs to store some + heap-allocated state (such as @ref Vk::FramebufferCreateInfo image view + handles), it should be made move-only with the `other._info` members + pointing to the stolen state cleared so the old instance doesn't reference + state that's owned by something else after the move. @section developers-vk-extension-dependent Checklist for Vulkan extension-dependent code paths