summaryrefslogtreecommitdiff
path: root/src/utils/memory.hpp
blob: 81e3757b0d920d9b2f339eda0f4a8a14ef154289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

template <typename memType>
memType *malloc_s(unsigned int size);

template <class Target>
class unique_ptr
{
public:
	unique_ptr(Target *target);
	~unique_ptr();

	Target operator *() const;
	Target *operator ->() const;

private:
	Target *_target;
};

template<class Target, typename...Args>
unique_ptr<Target> make_unique(Args&... args);

#include "memory.tpp"