MOS Source Code
Loading...
Searching...
No Matches
allocator.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include "mos/mm/slab.hpp"
6
7#include <mos/type_utils.hpp>
8
9namespace mos
10{
11 template<typename T, typename... Args>
12 requires mos::HasTypeName<T> T *create(Args &&...args)
13 {
14 static InitOnce<Slab<T>> _slab;
15 return _slab->create(args...);
16 }
17} // namespace mos
char args[3][16]
Definition avr_io.c:16
T * create(Args &&...args)
Definition allocator.hpp:12
constexpr auto HasTypeName