Commit 1c8828fe by Ivan Smirnov

Fix int_ shadowing problem in detail namespace

If operators.h is included, int_ function in the `detail`
namespace will shadow pybind11::int_ type, so the fully qualified
name has to be used.
parent b692896f
...@@ -407,7 +407,7 @@ struct npy_format_descriptor<T, typename std::enable_if<is_pod_struct<T>::value> ...@@ -407,7 +407,7 @@ struct npy_format_descriptor<T, typename std::enable_if<is_pod_struct<T>::value>
pybind11_fail("NumPy: unsupported field dtype"); pybind11_fail("NumPy: unsupported field dtype");
names.append(PYBIND11_STR_TYPE(field.name)); names.append(PYBIND11_STR_TYPE(field.name));
formats.append(field.descr); formats.append(field.descr);
offsets.append(int_(field.offset)); offsets.append(pybind11::int_(field.offset));
} }
dtype_ptr = pybind11::dtype(names, formats, offsets, sizeof(T)).release().ptr(); dtype_ptr = pybind11::dtype(names, formats, offsets, sizeof(T)).release().ptr();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment