Browse Source

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.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
dc2ab6ca47
  1. 9
      src/AbstractTexture.h

9
src/AbstractTexture.h

@ -95,9 +95,6 @@ do nothing.
class MAGNUM_EXPORT AbstractTexture { class MAGNUM_EXPORT AbstractTexture {
friend class Context; friend class Context;
AbstractTexture(const AbstractTexture&) = delete;
AbstractTexture& operator=(const AbstractTexture&) = delete;
public: public:
/** /**
* @brief Max supported layer count * @brief Max supported layer count
@ -124,9 +121,15 @@ class MAGNUM_EXPORT AbstractTexture {
*/ */
virtual ~AbstractTexture() = 0; virtual ~AbstractTexture() = 0;
/** @brief Copying is not allowed */
AbstractTexture(const AbstractTexture&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
AbstractTexture(AbstractTexture&& other); AbstractTexture(AbstractTexture&& other);
/** @brief Copying is not allowed */
AbstractTexture& operator=(const AbstractTexture&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
AbstractTexture& operator=(AbstractTexture&& other); AbstractTexture& operator=(AbstractTexture&& other);

Loading…
Cancel
Save