Skip to content

Commit 2f5dfbb

Browse files
committed
Move indirect_traits to boost/detail
[SVN r25117]
1 parent 3750668 commit 2f5dfbb

File tree

6 files changed

+20
-613
lines changed

6 files changed

+20
-613
lines changed

include/boost/python/arg_from_python.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
# include <boost/python/detail/prefix.hpp>
99
# include <boost/python/converter/arg_from_python.hpp>
10-
# include <boost/python/detail/indirect_traits.hpp>
1110

1211
namespace boost { namespace python {
1312

include/boost/python/converter/arg_from_python.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ struct select_arg_from_python
157157

158158
BOOST_STATIC_CONSTANT(
159159
bool, ptr_cref
160-
= boost::python::detail::is_reference_to_pointer<T>::value
161-
&& boost::python::detail::is_reference_to_const<T>::value
162-
&& !boost::python::detail::is_reference_to_volatile<T>::value);
160+
= indirect_traits::is_reference_to_pointer<T>::value
161+
&& indirect_traits::is_reference_to_const<T>::value
162+
&& !indirect_traits::is_reference_to_volatile<T>::value);
163163

164164

165165
BOOST_STATIC_CONSTANT(
166166
bool, ref =
167-
boost::python::detail::is_reference_to_non_const<T>::value
168-
|| boost::python::detail::is_reference_to_volatile<T>::value);
167+
indirect_traits::is_reference_to_non_const<T>::value
168+
|| indirect_traits::is_reference_to_volatile<T>::value);
169169

170170
BOOST_STATIC_CONSTANT(
171171
bool, back_ref =

include/boost/python/converter/arg_to_python.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ namespace detail
117117
, typename mpl::if_<
118118
mpl::or_<
119119
is_function<T>
120-
, python::detail::is_pointer_to_function<T>
120+
, indirect_traits::is_pointer_to_function<T>
121121
, is_member_function_pointer<T>
122122
>
123123
, function_arg_to_python<T>

include/boost/python/detail/enable_if.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
namespace boost { namespace python { namespace detail {
1414

15+
template <class T> struct always_void { typedef void type; };
16+
1517
template <class C, class T = int>
1618
struct enable_if_arg
1719
{
@@ -24,13 +26,13 @@ struct disable_if_arg
2426
typedef typename mpl::if_<C,int&,T>::type type;
2527
};
2628

27-
template <class C, class T = void>
29+
template <class C, class T = typename always_void<C>::type>
2830
struct enable_if_ret
2931
{
3032
typedef typename mpl::if_<C,T,int[2]>::type type;
3133
};
3234

33-
template <class C, class T = void>
35+
template <class C, class T = typename always_void<C>::type>
3436
struct disable_if_ret
3537
{
3638
typedef typename mpl::if_<C,int[2],T>::type type;

0 commit comments

Comments
 (0)