Skip to content

Commit

Permalink
Remove stray {}:
Browse files Browse the repository at this point in the history
```
/__w/pybind11clif/pybind11clif/tests/test_return_value_policy_pack.cpp:447:73: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init]
  447 |         py::arg("cb").noconvert().policies(py::return_value_policy_pack({rvpb})),
      |                                                                         ^~~~~~
```
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Aug 29, 2024
1 parent d1a6d59 commit 8535cd3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_return_value_policy_pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,23 +444,23 @@ TEST_SUBMODULE(return_value_policy_pack, m) {
return cb("\x80"
"ArgNoconvertPolicies");
},
py::arg("cb").noconvert().policies(py::return_value_policy_pack({rvpb})),
py::arg("cb").noconvert().policies(py::return_value_policy_pack(rvpb)),
rvpb);
m.def(
"arg_chaining_none_policies",
[](const std::function<std::string(std::string)> &cb) {
return cb("\x80"
"ArgNonePolicies");
},
py::arg("cb").none().policies(py::return_value_policy_pack({rvpb})),
py::arg("cb").none().policies(py::return_value_policy_pack(rvpb)),
rvpb);
m.def(
"arg_chaining_policies_noconvert",
[](const std::function<std::string(std::string)> &cb) {
return cb("\x80"
"ArgPoliciesNoconvert");
},
py::arg("cb").policies(py::return_value_policy_pack({rvpb})).noconvert(),
py::arg("cb").policies(py::return_value_policy_pack(rvpb)).noconvert(),
rvpb);

// Ensure chaining py::arg_v() member functions works.
Expand All @@ -480,6 +480,6 @@ TEST_SUBMODULE(return_value_policy_pack, m) {
}
return std::string("<NONE>");
},
(py::arg("cb") = py::none()).policies(py::return_value_policy_pack({rvpb})),
(py::arg("cb") = py::none()).policies(py::return_value_policy_pack(rvpb)),
rvpb);
}

0 comments on commit 8535cd3

Please sign in to comment.