File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
include/boost/python/detail Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1212
1313# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
1414# include < boost/type_traits/is_reference.hpp>
15+ # include < boost/type_traits/add_reference.hpp>
1516
1617# define BOOST_PYTHON_IS_XXX_DEF (name, qualified_name, nargs ) \
1718template <class X_ > \
@@ -20,7 +21,7 @@ struct is_##name \
2021 typedef char yes; \
2122 typedef char (&no)[2]; \
2223 \
23- static X_ dummy; \
24+ static typename add_reference<X_>::type dummy; \
2425 \
2526 template < BOOST_PP_ENUM_PARAMS_Z(1 , nargs, class U ) > \
2627 static yes test ( \
Original file line number Diff line number Diff line change @@ -20,8 +20,18 @@ int x_value(X const& x)
2020
2121X make_x (int n) { return X (n); }
2222
23+
24+ // foo/bar -- a regression for a vc7 bug workaround
25+ struct bar {};
26+ struct foo
27+ {
28+ virtual void f () = 0;
29+ operator bar () const { return bar (); }
30+ };
31+
2332BOOST_PYTHON_MODULE (implicit_ext)
2433{
34+ implicitly_convertible<foo,bar>();
2535 implicitly_convertible<int ,X>();
2636
2737 def (" x_value" , x_value);
You can’t perform that action at this time.
0 commit comments