Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc #90

Merged
merged 2 commits into from Sep 17, 2020
Merged

Misc #90

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions robotpy_build/templates/cls_rpy_include.hpp.j2
Expand Up @@ -16,8 +16,16 @@
#pragma once
#include <robotpy_build.h>

{% for inc in data.extra_includes_first %}
#include <{{ inc }}>
{% endfor %}

#include <{{ header.rel_fname }}>

{% for inc in data.extra_includes %}
#include <{{ inc }}>
{% endfor %}

{% if cls.x_has_trampoline %}
{% include 'cls_trampoline.hpp.j2' %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion robotpy_build/templates/cls_trampoline.hpp.j2
Expand Up @@ -115,7 +115,7 @@ struct Py{{ cls.x_qualname_ }} : CxxBase {
{%- else -%}
PYBIND11_OVERLOAD_NAME(
{%- endif -%}
{{ fn.rtnType }}, CxxBase, "{{ fn.x_name }}", {{ fn.name }},{{ fn.parameters | join(', ', attribute='name') }});
PYBIND11_TYPE({{ fn.rtnType }}), CxxBase, "{{ fn.x_name }}", {{ fn.name }},{{ fn.parameters | join(', ', attribute='name') }});
{%- endif %}
}
#endif
Expand Down
1 change: 1 addition & 0 deletions tests/cpp/pyproject.toml.tmpl
Expand Up @@ -45,6 +45,7 @@ generate = [
{ static_only = "static_only.h" },
{ type_caster = "type_caster.h" },
{ type_caster_nested = "type_caster_nested.h" },
{ virtual_comma = "virtual_comma.h" },
{ virtual_xform = "virtual_xform.h" },

# Inheritance
Expand Down
13 changes: 13 additions & 0 deletions tests/cpp/rpytest/ft/include/virtual_comma.h
@@ -0,0 +1,13 @@
#pragma once

#include <utility>

struct VirtualComma
{
virtual ~VirtualComma() {}

virtual std::pair<int, int> getTwoTwo()
{
return std::pair<int, int>{1, 2};
}
};