From 9f41c8eade51f88331758e561a7c12cea0042463 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 27 Feb 2018 23:43:16 -0400 Subject: [PATCH] Fix class name in overload failure message --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 9eff45dd..a50de836 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1963,7 +1963,7 @@ template function get_overload(const T *this_ptr, const char *name) { #define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...) \ PYBIND11_OVERLOAD_INT(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__) \ - pybind11::pybind11_fail("Tried to call pure virtual function \"" #cname "::" name "\""); + pybind11::pybind11_fail("Tried to call pure virtual function \"" PYBIND11_STRINGIFY(cname) "::" name "\""); #define PYBIND11_OVERLOAD(ret_type, cname, fn, ...) \ PYBIND11_OVERLOAD_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)