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
cd78bc9f
Commit
cd78bc9f
authored
Jan 25, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug code
parent
fc579fa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
cppa/detail/decorated_tuple.hpp
cppa/detail/decorated_tuple.hpp
+10
-1
No files found.
cppa/detail/decorated_tuple.hpp
View file @
cd78bc9f
...
...
@@ -32,7 +32,9 @@
#define DECORATED_TUPLE_HPP
#include <vector>
#include <algorithm>
#include "cppa/config.hpp"
#include "cppa/cow_ptr.hpp"
#include "cppa/ref_counted.hpp"
#include "cppa/uniform_type_info.hpp"
...
...
@@ -58,21 +60,26 @@ class decorated_tuple : public abstract_tuple
decorated_tuple
(
ptr_type
&&
d
,
vector_type
const
&
v
)
:
m_decorated
(
std
::
move
(
d
)),
m_mappings
(
v
)
{
CPPA_REQUIRE
(
v
.
size
()
==
sizeof
...(
ElementTypes
));
CPPA_REQUIRE
(
std
::
max_element
(
v
.
begin
(),
v
.
end
())
<
m_decorated
->
size
());
}
decorated_tuple
(
ptr_type
const
&
d
,
vector_type
const
&
v
)
:
m_decorated
(
d
),
m_mappings
(
v
)
{
CPPA_REQUIRE
(
v
.
size
()
==
sizeof
...(
ElementTypes
));
CPPA_REQUIRE
(
std
::
max_element
(
v
.
begin
(),
v
.
end
())
<
m_decorated
->
size
());
}
virtual
void
*
mutable_at
(
size_t
pos
)
{
CPPA_REQUIRE
(
pos
<
size
());
return
m_decorated
->
mutable_at
(
m_mappings
[
pos
]);
}
virtual
size_t
size
()
const
{
return
m_mappings
.
size
(
);
return
sizeof
...(
ElementTypes
);
}
virtual
decorated_tuple
*
copy
()
const
...
...
@@ -82,11 +89,13 @@ class decorated_tuple : public abstract_tuple
virtual
void
const
*
at
(
size_t
pos
)
const
{
CPPA_REQUIRE
(
pos
<
size
());
return
m_decorated
->
at
(
m_mappings
[
pos
]);
}
virtual
uniform_type_info
const
*
type_at
(
size_t
pos
)
const
{
CPPA_REQUIRE
(
pos
<
size
());
return
m_decorated
->
type_at
(
m_mappings
[
pos
]);
}
...
...
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