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
bd986fe5
Commit
bd986fe5
authored
May 21, 2016
by
Wenzel Jakob
Browse files
add comment about macro issues (fixes #203)
parent
02096a05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
docs/advanced.rst
docs/advanced.rst
+9
-0
No files found.
docs/advanced.rst
View file @
bd986fe5
...
@@ -313,6 +313,15 @@ a virtual method call.
...
@@ -313,6 +313,15 @@ a virtual method call.
>>> call_go(c)
>>> call_go(c)
u'meow! meow! meow! '
u'meow! meow! meow! '
.. warning::
Both :func:`PYBIND11_OVERLOAD` and :func:`PYBIND11_OVERLOAD_PURE` are
macros, which means that they can get confused by commas in a template
argument such as ``PYBIND11_OVERLOAD(MyReturnValue<T1, T2>, myFunc)``. In
this case, the preprocessor assumes that the comma indicates the beginnning
of the next parameter. Use a ``typedef`` to bind the template to another
name and use it in the macro to avoid this problem.
.. seealso::
.. seealso::
The file :file:`example/example12.cpp` contains a complete example that
The file :file:`example/example12.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