File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ class ReferenceSensitiveOptional {
164
164
namespace pybind11 { namespace detail {
165
165
template <typename T>
166
166
struct type_caster <ReferenceSensitiveOptional<T>> : optional_caster<ReferenceSensitiveOptional<T>> {};
167
- } // namespace pybind11:: detail
167
+ } // namespace detail
168
168
} // namespace pybind11
169
169
170
170
@@ -399,7 +399,7 @@ TEST_SUBMODULE(stl, m) {
399
399
return (x ? x.value () : 0 ) * 2 ;
400
400
});
401
401
m.def (" half_or_none_refsensitive" , [](int x) -> refsensitive_opt_int {
402
- return x ? refsensitive_opt_int (x / 2 ) : refsensitive_opt_int ();
402
+ return x != 0 ? refsensitive_opt_int (x / 2 ) : refsensitive_opt_int ();
403
403
});
404
404
// NOLINTNEXTLINE(performance-unnecessary-value-param)
405
405
m.def (" test_nullopt_refsensitive" , [](refsensitive_opt_int x) {
You can’t perform that action at this time.
0 commit comments