From 78806df1a419c3dc57157b0223986568ba209b8c Mon Sep 17 00:00:00 2001 From: Eric Cousineau Date: Thu, 2 Nov 2023 11:04:58 -0400 Subject: [PATCH] [numpy] Fix constexpr auto name for dtype=object Addresses compilation error for C++11 --- 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 a34bef207c..1510e79ed6 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -1570,7 +1570,7 @@ struct npy_format_descriptor_object { } pybind11_fail("Unsupported buffer format!"); } - static constexpr auto name = _("object"); + static constexpr auto name = const_name("object"); }; # define PYBIND11_NUMPY_OBJECT_DTYPE(Type) \