2020-01-18 03:38:21 -05:00
|
|
|
/*
|
2024-10-04 07:19:50 -04:00
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
2020-01-18 03:38:21 -05:00
|
|
|
*
|
2021-04-22 04:24:48 -04:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 03:38:21 -05:00
|
|
|
*/
|
|
|
|
|
2019-01-30 12:26:19 -05:00
|
|
|
#pragma once
|
|
|
|
|
2024-11-15 17:55:59 -05:00
|
|
|
#include <AK/Noncopyable.h>
|
2022-11-26 06:18:30 -05:00
|
|
|
#include <AK/Platform.h>
|
|
|
|
|
2019-06-12 02:47:51 -04:00
|
|
|
namespace AK {
|
|
|
|
|
2019-01-30 12:26:19 -05:00
|
|
|
template<typename T>
|
|
|
|
class Badge {
|
2024-11-15 17:55:59 -05:00
|
|
|
AK_MAKE_NONCOPYABLE(Badge);
|
|
|
|
AK_MAKE_NONMOVABLE(Badge);
|
|
|
|
|
2021-01-14 13:12:44 -05:00
|
|
|
public:
|
|
|
|
using Type = T;
|
|
|
|
|
|
|
|
private:
|
2019-01-30 12:26:19 -05:00
|
|
|
friend T;
|
2021-01-10 18:29:28 -05:00
|
|
|
constexpr Badge() = default;
|
2019-01-30 12:26:19 -05:00
|
|
|
};
|
2019-06-12 02:47:51 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-26 06:18:30 -05:00
|
|
|
#if USING_AK_GLOBALLY
|
2019-06-12 02:47:51 -04:00
|
|
|
using AK::Badge;
|
2022-11-26 06:18:30 -05:00
|
|
|
#endif
|