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
74c0c86c
Commit
74c0c86c
authored
May 04, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved tuple_dummy to its own header
parent
047214d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
29 deletions
+77
-29
cppa.files
cppa.files
+1
-0
cppa/detail/tuple_dummy.hpp
cppa/detail/tuple_dummy.hpp
+74
-0
cppa/match_expr.hpp
cppa/match_expr.hpp
+2
-29
No files found.
cppa.files
View file @
74c0c86c
...
...
@@ -67,6 +67,7 @@ cppa/detail/sync_request_bouncer.hpp
cppa/detail/tdata.hpp
cppa/detail/to_uniform_name.hpp
cppa/detail/tuple_cast_impl.hpp
cppa/detail/tuple_dummy.hpp
cppa/detail/tuple_iterator.hpp
cppa/detail/tuple_vals.hpp
cppa/detail/tuple_view.hpp
...
...
cppa/detail/tuple_dummy.hpp
0 → 100644
View file @
74c0c86c
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* *
* This file is part of libcppa. *
* libcppa is free software: you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, *
* or (at your option) any later version. *
* *
* libcppa is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/
#ifndef CPPA_DETAIL_TUPLE_DUMMY_HPP
#define CPPA_DETAIL_TUPLE_DUMMY_HPP
#include <typeinfo>
#include "cppa/util/type_list.hpp"
#include "cppa/detail/tuple_iterator.hpp"
namespace
cppa
{
namespace
detail
{
struct
tuple_dummy
{
typedef
util
::
empty_type_list
types
;
typedef
detail
::
tuple_iterator
<
tuple_dummy
>
const_iterator
;
inline
size_t
size
()
const
{
return
0
;
}
inline
void
*
mutable_at
(
size_t
)
{
return
nullptr
;
}
inline
const
void
*
at
(
size_t
)
const
{
return
nullptr
;
}
inline
const
uniform_type_info
*
type_at
(
size_t
)
const
{
return
nullptr
;
}
inline
const
std
::
type_info
*
type_token
()
const
{
return
&
typeid
(
util
::
empty_type_list
);
}
inline
bool
dynamically_typed
()
const
{
return
false
;
}
inline
const_iterator
begin
()
const
{
return
{
this
};
}
inline
const_iterator
end
()
const
{
return
{
this
,
0
};
}
};
}
// namespace detail
}
// namespace cppa
#endif // CPPA_DETAIL_TUPLE_DUMMY_HPP
cppa/match_expr.hpp
View file @
74c0c86c
...
...
@@ -47,6 +47,7 @@
#include "cppa/detail/matches.hpp"
#include "cppa/detail/projection.hpp"
#include "cppa/detail/value_guard.hpp"
#include "cppa/detail/tuple_dummy.hpp"
#include "cppa/detail/pseudo_tuple.hpp"
#include "cppa/detail/behavior_impl.hpp"
...
...
@@ -829,35 +830,7 @@ class match_expr {
template
<
class
Tuple
>
result_type
apply
(
Tuple
&
tup
)
{
if
(
tup
.
empty
())
{
struct
tuple_dummy
{
typedef
util
::
empty_type_list
types
;
typedef
detail
::
tuple_iterator
<
tuple_dummy
>
const_iterator
;
inline
size_t
size
()
const
{
return
0
;
}
inline
void
*
mutable_at
(
size_t
)
{
return
nullptr
;
}
inline
const
void
*
at
(
size_t
)
const
{
return
nullptr
;
}
inline
const
uniform_type_info
*
type_at
(
size_t
)
const
{
return
nullptr
;
}
inline
const
std
::
type_info
*
type_token
()
const
{
return
&
typeid
(
util
::
empty_type_list
);
}
inline
bool
dynamically_typed
()
const
{
return
false
;
}
inline
const_iterator
begin
()
const
{
return
{
this
};
}
inline
const_iterator
end
()
const
{
return
{
this
,
0
};
}
};
tuple_dummy
td
;
detail
::
tuple_dummy
td
;
auto
td_token_ptr
=
td
.
type_token
();
auto
td_bitmask
=
get_cache_entry
(
td_token_ptr
,
td
);
return
detail
::
unroll_expr
<
result_type
>
(
m_cases
,
...
...
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