NonCopyable.h 525 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (C) 2009-2015, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #ifndef ANKI_UTIL_NON_COPYABLE_H
  6. #define ANKI_UTIL_NON_COPYABLE_H
  7. namespace anki {
  8. /// @addtogroup util_patterns
  9. /// @{
  10. /// Makes a derived class non copyable
  11. struct NonCopyable
  12. {
  13. NonCopyable()
  14. {}
  15. NonCopyable(const NonCopyable&) = delete;
  16. NonCopyable& operator=(const NonCopyable&) = delete;
  17. ~NonCopyable()
  18. {}
  19. };
  20. /// @}
  21. } // end namespace anki
  22. #endif