From 25dd4789a8d8cecc42f054bd0938bb48dd54b7be Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Fri, 26 Feb 2016 13:09:22 +0100 Subject: [PATCH] Python overloading of virtual functions defined in class template --- 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 c25f00178..1ec41ace8 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1047,7 +1047,7 @@ inline function get_overload(const void *this_ptr, const char *name) { pybind11::gil_scoped_acquire gil; \ pybind11::function overload = pybind11::get_overload(this, #name); \ if (overload) \ - return overload.call(__VA_ARGS__).cast(); } + return overload.call(__VA_ARGS__).template cast(); } #define PYBIND11_OVERLOAD(ret_type, class_name, name, ...) \ PYBIND11_OVERLOAD_INT(ret_type, class_name, name, __VA_ARGS__) \