@@ -65,7 +65,7 @@ namespace detail
6565 struct tuple_extract_base_select
6666 {
6767 typedef typename Tuple::head_type head_type;
68- typedef typename mpl::apply1<Predicate,head_type>::type match_t ;
68+ typedef typename mpl::apply1<Predicate, add_reference< head_type>::type >::type match_t ;
6969 BOOST_STATIC_CONSTANT (bool , match = match_t ::value);
7070 typedef typename tuple_extract_impl<match>::template apply<Tuple,Predicate> type;
7171 };
@@ -85,15 +85,15 @@ namespace detail
8585 Tuple,
8686 mpl::logical_not<
8787 is_reference_to_class<
88- add_reference< mpl::_1>
88+ mpl::_1
8989 >
9090 > >
9191 {
9292 };
9393
9494 template <class Tuple >
9595 struct keyword_extract
96- : tuple_extract<Tuple, is_reference_to_keywords<add_reference< mpl::_1> > >
96+ : tuple_extract<Tuple, is_reference_to_keywords<mpl::_1 > >
9797 {
9898 };
9999
@@ -103,8 +103,8 @@ namespace detail
103103 Tuple,
104104 mpl::logical_and<
105105 mpl::logical_not<is_same<not_specified const &,mpl::_1> >
106- , is_reference_to_class<add_reference< mpl::_> >
107- , mpl::logical_not<is_reference_to_keywords<add_reference< mpl::_1> > >
106+ , is_reference_to_class<mpl::_1 >
107+ , mpl::logical_not<is_reference_to_keywords<mpl::_1 > >
108108 >
109109 >
110110 {
@@ -115,20 +115,18 @@ namespace detail
115115 : tuple_extract<
116116 Tuple,
117117 mpl::logical_or<
118- is_reference_to_function_pointer<mpl::_1>
119- , is_reference_to_function<mpl::_1>
120- , is_same<mpl::_1,tuples::null_type>
118+ is_reference_to_function_pointer<mpl::_1 >
119+ , is_reference_to_function<mpl::_1 >
121120 >
122121 >
123122 {
124123 };
125124
126- # define BOOST_PYTHON_DEF_HELPER_TAIL default_call_policies, keywords<0 >, char const *
127125 template <class T1 , class T2 = not_specified, class T3 = not_specified>
128126 struct def_helper
129127 {
130128 typedef boost::tuples::tuple<
131- T1 const &, T2 const &, T3 const &, default_call_policies, keywords<0 >, char const *
129+ T1 const &, T2 const &, T3 const &, default_call_policies, keywords<0 >, char const *, void (*)()
132130 > all_t ;
133131
134132 def_helper (T1 const & a1) : m_all(a1,m_nil,m_nil) {}
@@ -150,8 +148,14 @@ namespace detail
150148 return policy_extract<all_t >::extract (m_all);
151149 }
152150
153- typedef
154- typename default_implementation_extract<all_t >::result_type default_implementation () const
151+ private:
152+ typedef typename default_implementation_extract<all_t >::result_type default_implementation_t ;
153+ public:
154+ BOOST_STATIC_CONSTANT (
155+ bool , has_default_implementation = (
156+ !is_same<default_implementation_t , tuples::null_type>::value));
157+
158+ default_implementation_t default_implementation () const
155159 {
156160 return policy_extract<all_t >::extract (m_all);
157161 }
0 commit comments