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
43b09af3
Commit
43b09af3
authored
May 21, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example12 clarifications
parent
f64ff575
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
example/example12.cpp
+2
-0
No files found.
example/example12.cpp
View file @
43b09af3
...
@@ -89,6 +89,8 @@ void init_ex12(py::module &m) {
...
@@ -89,6 +89,8 @@ void init_ex12(py::module &m) {
/* Declare that 'PyExample12' is really an alias for the original type 'Example12' */
/* Declare that 'PyExample12' is really an alias for the original type 'Example12' */
.
alias
<
Example12
>
()
.
alias
<
Example12
>
()
.
def
(
py
::
init
<
int
>
())
.
def
(
py
::
init
<
int
>
())
/* Copy constructor (not needed in this case, but should generally be declared in this way) */
.
def
(
py
::
init
<
const
PyExample12
&>
())
/* Reference original class in function definitions */
/* Reference original class in function definitions */
.
def
(
"run"
,
&
Example12
::
run
)
.
def
(
"run"
,
&
Example12
::
run
)
.
def
(
"run_bool"
,
&
Example12
::
run_bool
)
.
def
(
"run_bool"
,
&
Example12
::
run_bool
)
...
...
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