add identificato pattern

This commit is contained in:
2025-04-05 14:24:38 +03:00
parent ab0334300e
commit 3f559432ba
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <cstddef>
namespace hack::patterns
{
template<typename T = std::size_t>
class identificator
{
public:
identificator() { m_id = m_counter; ++m_counter; }
public:
T m_id;
private:
static inline T m_counter = 0;
};
}