FreeRTOS f*ckery
This commit is contained in:
parent
4e45521e52
commit
4e9d7b1334
8 changed files with 122 additions and 13 deletions
|
@ -14,13 +14,8 @@ namespace f4ll_cpp {
|
|||
|
||||
template<typename T> class Singleton {
|
||||
public:
|
||||
static T &Instance() { return *m_instance; }
|
||||
template<typename ... Args>
|
||||
static T &Init(Args &&... args)
|
||||
{
|
||||
static T instance{ std::forward<Args>(args)... };
|
||||
if(!m_instance)
|
||||
m_instance = &instance;
|
||||
static T &Instance() {
|
||||
static T instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue