Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
71867830
Commit
71867830
authored
Jul 29, 2015
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switched cpp_function to use variadic arguments
parent
fbe82bf9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
include/pybind/operators.h
+10
-10
include/pybind/pybind.h
+0
-0
No files found.
include/pybind/operators.h
View file @
71867830
...
@@ -45,17 +45,17 @@ template <op_id, op_type, typename B, typename L, typename R> struct op_impl { }
...
@@ -45,17 +45,17 @@ template <op_id, op_type, typename B, typename L, typename R> struct op_impl { }
/// Operator implementation generator
/// Operator implementation generator
template
<
op_id
id
,
op_type
ot
,
typename
L
,
typename
R
>
struct
op_
{
template
<
op_id
id
,
op_type
ot
,
typename
L
,
typename
R
>
struct
op_
{
template
<
typename
base
,
typename
holder
>
void
execute
(
pybind
::
class_
<
base
,
holder
>
&
class_
,
const
char
*
doc
,
return_value_policy
policy
)
const
{
template
<
typename
Base
,
typename
Holder
,
typename
...
Extra
>
void
execute
(
pybind
::
class_
<
Base
,
Holder
>
&
class_
,
Extra
&&
...
extra
)
const
{
typedef
typename
std
::
conditional
<
std
::
is_same
<
L
,
self_t
>::
value
,
b
ase
,
L
>::
type
L_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
L
,
self_t
>::
value
,
B
ase
,
L
>::
type
L_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
R
,
self_t
>::
value
,
b
ase
,
R
>::
type
R_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
R
,
self_t
>::
value
,
B
ase
,
R
>::
type
R_type
;
typedef
op_impl
<
id
,
ot
,
b
ase
,
L_type
,
R_type
>
op
;
typedef
op_impl
<
id
,
ot
,
B
ase
,
L_type
,
R_type
>
op
;
class_
.
def
(
op
::
name
(),
&
op
::
execute
,
doc
,
policy
);
class_
.
def
(
op
::
name
(),
&
op
::
execute
,
std
::
forward
<
Extra
>
(
extra
)...
);
}
}
template
<
typename
base
,
typename
holder
>
void
execute_cast
(
pybind
::
class_
<
base
,
holder
>
&
class_
,
const
char
*
doc
,
return_value_policy
policy
)
const
{
template
<
typename
Base
,
typename
Holder
,
typename
...
Extra
>
void
execute_cast
(
pybind
::
class_
<
Base
,
Holder
>
&
class_
,
Extra
&&
...
extra
)
const
{
typedef
typename
std
::
conditional
<
std
::
is_same
<
L
,
self_t
>::
value
,
b
ase
,
L
>::
type
L_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
L
,
self_t
>::
value
,
B
ase
,
L
>::
type
L_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
R
,
self_t
>::
value
,
b
ase
,
R
>::
type
R_type
;
typedef
typename
std
::
conditional
<
std
::
is_same
<
R
,
self_t
>::
value
,
B
ase
,
R
>::
type
R_type
;
typedef
op_impl
<
id
,
ot
,
b
ase
,
L_type
,
R_type
>
op
;
typedef
op_impl
<
id
,
ot
,
B
ase
,
L_type
,
R_type
>
op
;
class_
.
def
(
op
::
name
(),
&
op
::
execute_cast
,
doc
,
policy
);
class_
.
def
(
op
::
name
(),
&
op
::
execute_cast
,
std
::
forward
<
Extra
>
(
extra
)...
);
}
}
};
};
...
...
include/pybind/pybind.h
View file @
71867830
This diff is collapsed.
Click to expand it.
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