Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
61d67f04
Commit
61d67f04
authored
Dec 14, 2015
by
Wenzel Jakob
Browse files
a few more documentation improvements
parent
44db04f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
docs/advanced.rst
docs/advanced.rst
+9
-1
No files found.
docs/advanced.rst
View file @
61d67f04
...
...
@@ -393,7 +393,7 @@ information, it is not clear whether Python should take charge of the returned
value and eventually free its resources, or if this is handled on the C++ side.
For this reason, pybind11 provides a several `return value policy` annotations
that can be passed to the :func:`module::def` and :func:`class_::def`
functions. The default policy is :enum:`return_value_policy::automatic`
`
.
functions. The default policy is :enum:`return_value_policy::automatic`.
+--------------------------------------------------+---------------------------------------------------------------------------+
...
...
@@ -504,6 +504,14 @@ be declared at the top level before any binding code:
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
.. warning::
The first argument of :func:`PYBIND11_DECLARE_HOLDER_TYPE` should be a
placeholder name that is used as a template parameter of the second
argument. Thus, feel free to use any identifier, but use it consistently on
both sides; also, don't use the name of a type that already exists in your
codebase.
.. seealso::
The file :file:`example/example8.cpp` contains a complete example that
...
...
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