Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
43b09af3
Commit
43b09af3
authored
May 21, 2016
by
Wenzel Jakob
Browse files
example12 clarifications
parent
f64ff575
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
example/example12.cpp
example/example12.cpp
+2
-0
No files found.
example/example12.cpp
View file @
43b09af3
...
...
@@ -89,6 +89,8 @@ void init_ex12(py::module &m) {
/* Declare that 'PyExample12' is really an alias for the original type 'Example12' */
.
alias
<
Example12
>
()
.
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 */
.
def
(
"run"
,
&
Example12
::
run
)
.
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