libcopp
2.3.1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
c
d
f
g
h
i
m
o
p
r
s
t
w
y
Variables
_
a
b
c
d
e
f
g
h
l
m
o
p
r
s
t
u
w
x
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
_
a
b
c
d
e
f
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
Enumerator
e
l
s
u
Related Symbols
_
d
e
i
l
o
r
s
w
Files
File List
Globals
All
_
b
c
e
g
j
l
m
o
p
r
s
t
u
w
Functions
b
c
g
j
m
o
p
r
s
t
Variables
b
c
g
m
s
t
Typedefs
Enumerations
Enumerator
c
e
Macros
_
c
l
m
s
t
u
w
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
include
libcotask
core
standard_new_allocator.h
Go to the documentation of this file.
1
// Copyright 2023 owent
2
3
#pragma once
4
5
#include <libcopp/utils/config/libcopp_build_features.h>
6
#include <
libcopp/utils/features.h
>
7
#include <
libcopp/utils/memory/default_smart_ptr_trait.h
>
8
9
// clang-format off
10
#include <
libcopp/utils/config/stl_include_prefix.h
>
// NOLINT(build/include_order)
11
// clang-format on
12
#include <memory>
13
// clang-format off
14
#include <
libcopp/utils/config/stl_include_suffix.h
>
// NOLINT(build/include_order)
15
// clang-format on
16
17
LIBCOPP_COTASK_NAMESPACE_BEGIN
18
namespace
core
{
19
class
LIBCOPP_COTASK_API_HEAD_ONLY
standard_new_allocator
{
20
public
:
26
template
<
class
Ty,
class
... TARGS>
27
static
LIBCOPP_COPP_NAMESPACE_ID::memory::default_strong_rc_ptr<Ty>
allocate
(Ty *, TARGS &&...args) {
28
return
LIBCOPP_COPP_NAMESPACE_ID::memory::default_make_strong<Ty>(std::forward<TARGS>(args)...);
29
}
27
static
LIBCOPP_COPP_NAMESPACE_ID::memory::default_strong_rc_ptr<Ty>
allocate
(Ty *, TARGS &&...args) {
…
}
30
31
template
<
class
Ty>
32
static
void
deallocate
(LIBCOPP_COPP_NAMESPACE_ID::memory::default_strong_rc_ptr<Ty> &) {}
33
};
19
class
LIBCOPP_COTASK_API_HEAD_ONLY
standard_new_allocator
{
…
};
34
}
// namespace core
18
namespace
core
{
…
}
35
LIBCOPP_COTASK_NAMESPACE_END
core::standard_new_allocator
Definition
standard_new_allocator.h:19
core::standard_new_allocator::deallocate
static void deallocate(LIBCOPP_COPP_NAMESPACE_ID::memory::default_strong_rc_ptr< Ty > &)
Definition
standard_new_allocator.h:32
core::standard_new_allocator::allocate
static LIBCOPP_COPP_NAMESPACE_ID::memory::default_strong_rc_ptr< Ty > allocate(Ty *, TARGS &&...args)
allocate a object
Definition
standard_new_allocator.h:27
default_smart_ptr_trait.h
features.h
core
Definition
standard_new_allocator.h:18
stl_include_prefix.h
stl_include_suffix.h
Generated by
1.9.8