diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index ac13616d2..7a6e56302 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -2152,8 +2152,8 @@ template function get_overload(const T *this_ptr, const char *name) { PYBIND11_OVERLOAD_NAME( std::string, // Return type (ret_type) Animal, // Parent class (cname) - toString, // Name of function in C++ (name) - "__str__", // Name of method in Python (fn) + "__str__", // Name of method in Python (name) + toString, // Name of function in C++ (fn) ); } \endrst */