diff --git a/include/boost/python/detail/is_xxx.hpp b/include/boost/python/detail/is_xxx.hpp index ad888b84..0faea999 100644 --- a/include/boost/python/detail/is_xxx.hpp +++ b/include/boost/python/detail/is_xxx.hpp @@ -12,6 +12,7 @@ # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include +# include # define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \ template \ @@ -20,7 +21,7 @@ struct is_##name \ typedef char yes; \ typedef char (&no)[2]; \ \ - static X_ dummy; \ + static typename add_reference::type dummy; \ \ template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \ static yes test( \ diff --git a/test/implicit.cpp b/test/implicit.cpp index b56e6b10..c4728548 100644 --- a/test/implicit.cpp +++ b/test/implicit.cpp @@ -20,8 +20,18 @@ int x_value(X const& x) X make_x(int n) { return X(n); } + +// foo/bar -- a regression for a vc7 bug workaround +struct bar {}; +struct foo +{ + virtual void f() = 0; + operator bar() const { return bar(); } +}; + BOOST_PYTHON_MODULE(implicit_ext) { + implicitly_convertible(); implicitly_convertible(); def("x_value", x_value);