Skip to content

Commit aa58e21

Browse files
committed
Bug fix, thanks to "Daniel Paull" <dlp@fractaltechnologies.com> for
reporting it. [SVN r16698]
1 parent eac0412 commit aa58e21

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

include/boost/python/signature.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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)))
102105
template <
103106
class RT, class ClassT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
104107
inline 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)>
106109
get_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

Comments
 (0)