Skip to content
Snippets Groups Projects
Commit 2c180895 authored by Wilson Jallet's avatar Wilson Jallet :clapper:
Browse files

[std-array] array_indexing_suite::delete_item and ::delete_slice will throw Python exceptions

parent f4d61ccc
No related branches found
No related tags found
No related merge requests found
Pipeline #33657 passed with warnings
...@@ -40,11 +40,19 @@ class array_indexing_suite ...@@ -40,11 +40,19 @@ class array_indexing_suite
template <class Class> template <class Class>
static void extension_def(Class &) {} static void extension_def(Class &) {}
// no-op // throws exception
static void delete_item(Container &, index_type) {} static void delete_item(Container &, index_type) {
// no-op PyErr_SetString(PyExc_NotImplementedError,
// no-op "Cannot delete item from std::array type.");
static void delete_slice(Container &, index_type, index_type) {} bp::throw_error_already_set();
}
// throws exception
static void delete_slice(Container &, index_type, index_type) {
PyErr_SetString(PyExc_NotImplementedError,
"Cannot delete slice from std::array type.");
bp::throw_error_already_set();
}
static void set_slice(Container &container, index_type from, index_type to, static void set_slice(Container &container, index_type from, index_type to,
data_type const &v) { data_type const &v) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment