@@ -52,8 +52,11 @@ namespace boost { namespace python { namespace detail {
5252// return mpl::list<RT, ClassT&, T0...TN>();
5353// }
5454//
55- // These functions extract the return type, class (for member functions)
56- // and arguments of the input signature and stuffs them in an mpl::list.
55+ // These functions extract the return type, class (for member
56+ // functions) and arguments of the input signature and stuffs them in
57+ // an mpl::list. Note that cv-qualification is dropped from the
58+ // target class; that is a necessary sacrifice to ensure that an
59+ // lvalue from_python converter is used.
5760//
5861// /////////////////////////////////////////////////////////////////////////////
5962
@@ -102,11 +105,11 @@ get_signature(RT(*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)))
102105template <
103106 class RT, class ClassT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1 , N, class T )>
104107inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))<
105- RT, ClassT Q & BOOST_PP_ENUM_TRAILING_PARAMS_Z(1 , N, T)>
108+ RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z(1 , N, T)>
106109get_signature(RT(ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1 , N, T)) Q)
107110{
108111 return BOOST_PYTHON_LIST_INC (BOOST_PP_INC (N))<
109- RT, ClassT Q & BOOST_PP_ENUM_TRAILING_PARAMS_Z (1 , N, T)
112+ RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z (1 , N, T)
110113 >();
111114}
112115
0 commit comments