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
75d4768f
Commit
75d4768f
authored
Jan 16, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tbind
parent
3abc4894
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
16 deletions
+51
-16
cppa.files
cppa.files
+1
-0
cppa/util/tbind.hpp
cppa/util/tbind.hpp
+34
-0
unit_testing/test__pattern.cpp
unit_testing/test__pattern.cpp
+16
-16
No files found.
cppa.files
View file @
75d4768f
...
...
@@ -255,3 +255,4 @@ cppa/util/arg_match_t.hpp
cppa/detail/types_array.hpp
cppa/util/is_builtin.hpp
cppa/util/type_pair.hpp
cppa/util/tbind.hpp
cppa/util/tbind.hpp
0 → 100644
View file @
75d4768f
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011, 2012 *
* 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 3 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 TBIND_HPP
#define TBIND_HPP
#endif // TBIND_HPP
unit_testing/test__pattern.cpp
View file @
75d4768f
...
...
@@ -34,26 +34,26 @@ typedef std::pair<int,int> foobar;
static
detail
::
types_array
<
int
,
anything
,
float
>
arr1
;
static
detail
::
types_array
<
int
,
anything
,
foobar
>
arr2
;
template
<
template
<
typename
,
typename
>
class
Tpl
,
typename
Arg1
>
struct
tbind
{
template
<
typename
Arg2
>
struct
type
{
static
constexpr
bool
value
=
Tpl
<
Arg1
,
Arg2
>::
value
;
};
};
template
<
template
<
typename
>
class
Predicate
,
class
Value
>
struct
foobaz
{
static
constexpr
bool
value
=
Predicate
<
Value
>::
value
;
};
//
template<template <typename, typename> class Tpl, typename Arg1>
//
struct tbind
//
{
//
template<typename Arg2>
//
struct type
//
{
//
static constexpr bool value = Tpl<Arg1, Arg2>::value;
//
};
//
};
//
template<template<typename> class Predicate, class Value>
//
struct foobaz
//
{
//
static constexpr bool value = Predicate<Value>::value;
//
};
size_t
test__pattern
()
{
cout
<<
"foobaz: "
<<
foobaz
<
tbind
<
std
::
is_same
,
void
>::
type
,
void
>::
value
<<
endl
;
//
cout << "foobaz: " << foobaz<tbind<std::is_same, void>::type, void>::value << endl;
announce
<
foobar
>
(
&
foobar
::
first
,
&
foobar
::
second
);
...
...
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