NonCopyable.h 443 B

123456789101112131415161718
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. JPH_NAMESPACE_BEGIN
  6. /// Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
  7. class JPH_EXPORT NonCopyable
  8. {
  9. public:
  10. NonCopyable() = default;
  11. NonCopyable(const NonCopyable &) = delete;
  12. void operator = (const NonCopyable &) = delete;
  13. };
  14. JPH_NAMESPACE_END