AK: Use Noncopyable.h in Badge

This commit is contained in:
Jonne Ransijn 2024-11-15 23:55:59 +01:00 committed by Sam Atkins
parent cca84aa28d
commit 501a7dbaa3
Notes: github-actions[bot] 2024-12-04 16:47:42 +00:00

View file

@ -6,24 +6,22 @@
#pragma once #pragma once
#include <AK/Noncopyable.h>
#include <AK/Platform.h> #include <AK/Platform.h>
namespace AK { namespace AK {
template<typename T> template<typename T>
class Badge { class Badge {
AK_MAKE_NONCOPYABLE(Badge);
AK_MAKE_NONMOVABLE(Badge);
public: public:
using Type = T; using Type = T;
private: private:
friend T; friend T;
constexpr Badge() = default; constexpr Badge() = default;
Badge(Badge const&) = delete;
Badge& operator=(Badge const&) = delete;
Badge(Badge&&) = delete;
Badge& operator=(Badge&&) = delete;
}; };
} }