77# define INDIRECT_TRAITS_DWA2002131_HPP
88# include < boost/type_traits/cv_traits.hpp>
99# include < boost/type_traits/composite_traits.hpp>
10+ # include < boost/type_traits/function_traits.hpp>
1011# include < boost/mpl/select_type.hpp>
1112
1213namespace boost { namespace python { namespace detail {
@@ -24,6 +25,68 @@ struct is_reference_to_const<T const&>
2425 BOOST_STATIC_CONSTANT (bool , value = true );
2526};
2627
28+ # if 0 // Corresponding code doesn't work on MSVC yet
29+ template <class T >
30+ struct is_reference_to_function
31+ {
32+ BOOST_STATIC_CONSTANT (bool , value = false );
33+ };
34+
35+ template <class T >
36+ struct is_reference_to_function <T&>
37+ {
38+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
39+ };
40+
41+ template <class T >
42+ struct is_reference_to_function <T const &>
43+ {
44+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
45+ };
46+
47+ template <class T >
48+ struct is_reference_to_function <T volatile &>
49+ {
50+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
51+ };
52+
53+ template <class T >
54+ struct is_reference_to_function <T const volatile &>
55+ {
56+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
57+ };
58+ # endif
59+
60+ template <class T >
61+ struct is_pointer_to_function
62+ {
63+ BOOST_STATIC_CONSTANT (bool , value = false );
64+ };
65+
66+ template <class T >
67+ struct is_pointer_to_function <T*>
68+ {
69+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
70+ };
71+
72+ template <class T >
73+ struct is_pointer_to_function <T const *>
74+ {
75+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
76+ };
77+
78+ template <class T >
79+ struct is_pointer_to_function <T volatile *>
80+ {
81+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
82+ };
83+
84+ template <class T >
85+ struct is_pointer_to_function <T const volatile *>
86+ {
87+ BOOST_STATIC_CONSTANT (bool , value = is_function<T>::value);
88+ };
89+
2790template <class T >
2891struct is_reference_to_non_const
2992{
@@ -114,6 +177,25 @@ struct is_pointer_help
114177 >::type type;
115178};
116179
180+ # if 0 // doesn't seem to work yet
181+ template <class T >
182+ struct is_reference_to_function
183+ {
184+ static T t;
185+ BOOST_STATIC_CONSTANT (
186+ bool , value
187+ = sizeof (::boost::detail::is_function_tester(t)) == sizeof (::boost::type_traits::yes_type));
188+ # endif
189+
190+ template <class T >
191+ struct is_pointer_to_function
192+ {
193+ static T t;
194+ BOOST_STATIC_CONSTANT (
195+ bool , value
196+ = sizeof (::boost::detail::is_function_tester(t)) == sizeof (::boost::type_traits::yes_type));
197+ };
198+
117199template <typename V>
118200typename is_const_help<V>::type reference_to_const_helper (V&);
119201outer_no_type
0 commit comments