1919
2020# include < boost/python/detail/indirect_traits.hpp>
2121# include < boost/python/detail/not_specified.hpp>
22+ # include < boost/python/detail/value_arg.hpp>
2223
2324# include < boost/type_traits/add_const.hpp>
2425# include < boost/type_traits/add_reference.hpp>
@@ -51,10 +52,6 @@ namespace detail
5152 template <class Data , class Class >
5253 struct member
5354 {
54- private:
55- typedef typename add_const<Data>::type data_const;
56- typedef typename add_reference<data_const>::type data_cref;
57-
5855 public:
5956 member (Data Class::*which) : m_which(which) {}
6057
@@ -63,7 +60,7 @@ namespace detail
6360 return c.*m_which;
6461 }
6562
66- void operator ()(Class& c, data_cref d) const
63+ void operator ()(Class& c, typename value_arg<Data>::type d) const
6764 {
6865 c.*m_which = d;
6966 }
@@ -76,10 +73,6 @@ namespace detail
7673 template <class Data >
7774 struct datum
7875 {
79- private:
80- typedef typename add_const<Data>::type data_const;
81- typedef typename add_reference<data_const>::type data_cref;
82-
8376 public:
8477 datum (Data *which) : m_which(which) {}
8578
@@ -88,7 +81,7 @@ namespace detail
8881 return *m_which;
8982 }
9083
91- void operator ()(data_cref d) const
84+ void operator ()(typename value_arg<Data>::type d) const
9285 {
9386 *m_which = d;
9487 }
@@ -112,11 +105,11 @@ namespace detail
112105 : mpl::and_<
113106 mpl::bool_<
114107 to_python_value<
115- typename add_reference< typename add_const<T>::type >::type
108+ typename value_arg<T >::type
116109 >::uses_registry
117110 >
118111 , is_reference_to_class<
119- typename add_reference< typename add_const<T>::type >::type
112+ typename value_arg<T >::type
120113 >
121114 >
122115 {
0 commit comments