Skip to content

Commit 9ca6290

Browse files
committed
Fix typos in std::optional test
1 parent 6a308a4 commit 9ca6290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_python_types.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ test_initializer python_types([](py::module &m) {
353353
return x.value_or(42);
354354
}, py::arg_v("x", std::nullopt, "None"));
355355
m.def("test_no_move_assign", [](const opt_no_move_assign &x) {
356-
return x ? x.value : 42;
357-
}, py::argv_("x", std::nullopt, "None"));
356+
return x ? x->value : 42;
357+
}, py::arg_v("x", std::nullopt, "None"));
358358
#endif
359359

360360
#ifdef PYBIND11_HAS_EXP_OPTIONAL

0 commit comments

Comments
 (0)