diff --git a/robotpy_build/autowrap/render_cls_rpy_include.py b/robotpy_build/autowrap/render_cls_rpy_include.py index b6694684..c1e169ad 100644 --- a/robotpy_build/autowrap/render_cls_rpy_include.py +++ b/robotpy_build/autowrap/render_cls_rpy_include.py @@ -40,14 +40,15 @@ def render_cls_rpy_include_hpp(ctx: HeaderContext, cls: ClassContext) -> str: ) if ctx.extra_includes_first: - r.writeln() + r.writeln("\n// from extra_includes_first") for inc in ctx.extra_includes_first: r.writeln(f"#include <{inc}>") + r.writeln("\n// wrapped header") r.writeln(f"\n#include <{ctx.rel_fname}>") if ctx.extra_includes: - r.writeln() + r.writeln("\n// from extra_includes") for inc in ctx.extra_includes: r.writeln(f"#include <{inc}>") diff --git a/tests/cpp/gen/ft/tbasic.yml b/tests/cpp/gen/ft/tbasic.yml index 3c2c4b23..ebea2fce 100644 --- a/tests/cpp/gen/ft/tbasic.yml +++ b/tests/cpp/gen/ft/tbasic.yml @@ -7,7 +7,7 @@ classes: t: template_inline_code: | cls_TBasic - .def("__repr__", [=](const TBasic &self){ + .def("__repr__", [this](const TBasic &self){ // checking to see if clsName is available return "<" + clsName + ">"; }); diff --git a/tests/cpp/rpytest/ft/include/abstract.h b/tests/cpp/rpytest/ft/include/abstract.h index 431aa4f4..b558aa4f 100644 --- a/tests/cpp/rpytest/ft/include/abstract.h +++ b/tests/cpp/rpytest/ft/include/abstract.h @@ -8,6 +8,7 @@ struct Abstract struct PrivateAbstract { PrivateAbstract() {} + virtual ~PrivateAbstract() = default; static int getPrivateOverride(PrivateAbstract *p) { return p->mustOverrideMe(); diff --git a/tests/cpp/rpytest/ft/include/buffers.h b/tests/cpp/rpytest/ft/include/buffers.h index 43b0bb72..e6b25f5c 100644 --- a/tests/cpp/rpytest/ft/include/buffers.h +++ b/tests/cpp/rpytest/ft/include/buffers.h @@ -6,6 +6,8 @@ class Buffers { public: + virtual ~Buffers() = default; + // in void set_buffer(const uint8_t *data, size_t len) { m_buf.resize(len); diff --git a/tests/cpp/rpytest/ft/include/lifetime.h b/tests/cpp/rpytest/ft/include/lifetime.h index eb04dde9..64f31a04 100644 --- a/tests/cpp/rpytest/ft/include/lifetime.h +++ b/tests/cpp/rpytest/ft/include/lifetime.h @@ -3,6 +3,8 @@ #include struct LTWithVirtual { + virtual ~LTWithVirtual() = default; + virtual bool get_bool() { return false; } diff --git a/tests/cpp/rpytest/ft/include/ns_hidden.h b/tests/cpp/rpytest/ft/include/ns_hidden.h index 75c8b4f6..53e494de 100644 --- a/tests/cpp/rpytest/ft/include/ns_hidden.h +++ b/tests/cpp/rpytest/ft/include/ns_hidden.h @@ -12,7 +12,7 @@ namespace o { virtual ~O() = default; }; - class AnotherC; + struct AnotherC; }; namespace n::h { diff --git a/tests/cpp/rpytest/ft/include/templates/tvbase.h b/tests/cpp/rpytest/ft/include/templates/tvbase.h index be148880..e25f1e59 100644 --- a/tests/cpp/rpytest/ft/include/templates/tvbase.h +++ b/tests/cpp/rpytest/ft/include/templates/tvbase.h @@ -10,6 +10,8 @@ struct TVParam { template struct TVBase { + virtual ~TVBase() = default; + virtual std::string get(T t) const { return "TVBase " + std::to_string(t.get()); }