2025-01-10 08:15:31 +01:00
|
|
|
#include <cstdint>
|
|
|
|
template <typename T> class User {
|
2025-01-11 17:54:29 +01:00
|
|
|
T id;
|
2025-01-10 08:15:31 +01:00
|
|
|
|
2025-01-11 17:54:29 +01:00
|
|
|
public:
|
|
|
|
explicit User(T n) : id(n) {}
|
2025-01-10 08:15:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
2025-01-11 17:54:29 +01:00
|
|
|
User<int> user1{1};
|
|
|
|
User<uint8_t> user2(0xFF);
|
2025-01-10 08:15:31 +01:00
|
|
|
}
|