Skip to content

Commit 146380f

Browse files
committed
Fix typo in std::optional test
1 parent 6a308a4 commit 146380f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_python_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ 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;
356+
return x ? x->value : 42;
357357
}, py::argv_("x", std::nullopt, "None"));
358358
#endif
359359

0 commit comments

Comments
 (0)