From f70cc112f0c0ea2a3fbac47bc092ce165fb98135 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sat, 22 Oct 2016 10:50:39 +0100 Subject: [PATCH] Make dtype from string ctor accept const ref --- 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 04001d6c5..588cc1519 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -170,7 +170,7 @@ public: m_ptr = descr.strip_padding().release().ptr(); } - explicit dtype(std::string format) { + explicit dtype(const std::string &format) { m_ptr = from_args(pybind11::str(format)).release().ptr(); }