std::array<> caster: support arbitrary sequences (#1602)
This PR brings the std::array<> caster in sync with the other STL type
casters: to accept an arbitrary sequence as input (rather than a list,
which is too restrictive).
diff --git a/tests/test_stl.cpp b/tests/test_stl.cpp
index 8736ea8..0bb6433 100644
--- a/tests/test_stl.cpp
+++ b/tests/test_stl.cpp
@@ -263,4 +263,6 @@
return result;
},
py::return_value_policy::take_ownership);
+
+ m.def("array_cast_sequence", [](std::array<int, 3> x) { return x; });
}