From dc2ab6ca472ed5ff98d2b3dfd0a897ff99fd5db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 2 Jul 2013 01:22:35 +0200 Subject: [PATCH] Document disallowed copy and allowed move better. Moreover when the deleted function was private, the compilation failed with (rather cryptic) error that the function is private instead of noticing that the function is deleted. --- src/AbstractTexture.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index de44bd57a..6934a5f4c 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -95,9 +95,6 @@ do nothing. class MAGNUM_EXPORT AbstractTexture { friend class Context; - AbstractTexture(const AbstractTexture&) = delete; - AbstractTexture& operator=(const AbstractTexture&) = delete; - public: /** * @brief Max supported layer count @@ -124,9 +121,15 @@ class MAGNUM_EXPORT AbstractTexture { */ virtual ~AbstractTexture() = 0; + /** @brief Copying is not allowed */ + AbstractTexture(const AbstractTexture&) = delete; + /** @brief Move constructor */ AbstractTexture(AbstractTexture&& other); + /** @brief Copying is not allowed */ + AbstractTexture& operator=(const AbstractTexture&) = delete; + /** @brief Move assignment */ AbstractTexture& operator=(AbstractTexture&& other);