Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
31079da1
Commit
31079da1
authored
Jul 02, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build w/o mem. mgmt., close #483
parent
7debd139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
28 deletions
+1
-28
libcaf_core/caf/detail/memory.hpp
libcaf_core/caf/detail/memory.hpp
+1
-28
No files found.
libcaf_core/caf/detail/memory.hpp
View file @
31079da1
...
@@ -60,27 +60,6 @@ class basic_memory_cache;
...
@@ -60,27 +60,6 @@ class basic_memory_cache;
#ifdef CAF_NO_MEM_MANAGEMENT
#ifdef CAF_NO_MEM_MANAGEMENT
template
<
class
T
>
struct
rc_storage
:
public
ref_counted
{
T
instance
;
template
<
class
...
Ts
>
rc_storage
(
Ts
&&
...
xs
)
:
instance
(
intrusive_ptr
<
ref_counted
>
(
this
,
false
),
std
::
forward
<
Ts
>
(
xs
)...)
{
CAF_ASSERT
(
get_reference_count
()
>=
1
);
}
};
template
<
class
T
>
T
*
unbox_rc_storage
(
T
*
ptr
)
{
return
ptr
;
}
template
<
class
T
>
T
*
unbox_rc_storage
(
rc_storage
<
T
>*
ptr
)
{
return
&
(
ptr
->
instance
);
}
class
memory
{
class
memory
{
public:
public:
memory
()
=
delete
;
memory
()
=
delete
;
...
@@ -88,13 +67,7 @@ public:
...
@@ -88,13 +67,7 @@ public:
// Allocates storage, initializes a new object, and returns the new instance.
// Allocates storage, initializes a new object, and returns the new instance.
template
<
class
T
,
class
...
Ts
>
template
<
class
T
,
class
...
Ts
>
static
T
*
create
(
Ts
&&
...
xs
)
{
static
T
*
create
(
Ts
&&
...
xs
)
{
using
embedded_t
=
return
new
T
(
std
::
forward
<
Ts
>
(
xs
)...);
typename
std
::
conditional
<
T
::
memory_cache_flag
==
provides_embedding
,
rc_storage
<
T
>
,
T
>::
type
;
return
unbox_rc_storage
(
new
embedded_t
(
std
::
forward
<
Ts
>
(
xs
)...));
}
}
static
inline
memory_cache
*
get_cache_map_entry
(
const
std
::
type_info
*
)
{
static
inline
memory_cache
*
get_cache_map_entry
(
const
std
::
type_info
*
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment