From 1c8828fe8f408cf864c1182dd3e0f103220540de Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Thu, 25 Aug 2016 00:33:02 +0100 Subject: [PATCH] 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. --- include/pybind11/numpy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index 57961c5a..79c4cf37 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -407,7 +407,7 @@ struct npy_format_descriptor::value> pybind11_fail("NumPy: unsupported field dtype"); names.append(PYBIND11_STR_TYPE(field.name)); 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();