Skip to content

Commit 6f2aa5d

Browse files
update
1 parent ac666e8 commit 6f2aa5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_with_catch/test_interpreter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Item {
100100
virtual int getInt() const = 0;
101101
};
102102

103-
class ItemTrampoline : public Item, public py::trampoline_self_life_support {
103+
class ItemTrampoline : Item, public py::trampoline_self_life_support {
104104
public:
105105
int getInt() const override { PYBIND11_OVERRIDE_PURE(int, Item, getInt, ); }
106106
};
@@ -121,7 +121,7 @@ class ItemDerived(embedded_smart_holder.Item):
121121

122122
auto py_item_derived = py::globals()["ItemDerived"]();
123123

124-
auto item = py_item_derived.cast<std::shared_ptr<Item>>()->getInt(); // cast cpp
124+
auto item = py_item_derived.cast<std::shared_ptr<Item>>(); // cast cpp
125125

126126
if (item->getInt() != 42) // test cpp
127127
throw std::runtime_error("Not 42");

0 commit comments

Comments
 (0)