Skip to content

Commit 9f41c8e

Browse files
committed
Fix class name in overload failure message
1 parent e88656a commit 9f41c8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ template <class T> function get_overload(const T *this_ptr, const char *name) {
19631963

19641964
#define PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...) \
19651965
PYBIND11_OVERLOAD_INT(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), name, __VA_ARGS__) \
1966-
pybind11::pybind11_fail("Tried to call pure virtual function \"" #cname "::" name "\"");
1966+
pybind11::pybind11_fail("Tried to call pure virtual function \"" PYBIND11_STRINGIFY(cname) "::" name "\"");
19671967

19681968
#define PYBIND11_OVERLOAD(ret_type, cname, fn, ...) \
19691969
PYBIND11_OVERLOAD_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__)

0 commit comments

Comments
 (0)