66#ifndef TYPE_ID_DWA20011127_HPP
77# define TYPE_ID_DWA20011127_HPP
88# include < boost/python/detail/config.hpp>
9- # include < boost/python/detail/config .hpp>
9+ # include < boost/python/detail/indirect_traits .hpp>
1010# include < boost/mpl/select_type.hpp>
11- # include < boost/type_traits/cv_traits.hpp>
12- # include < boost/type_traits/composite_traits.hpp>
1311# include < boost/operators.hpp>
1412# include < typeinfo>
1513# include < iosfwd>
@@ -79,80 +77,6 @@ struct type_id_t : totally_ordered<type_id_t>
7977 base_id_t m_base_type;
8078};
8179
82- # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
83- template <class T >
84- struct is_reference_to_const
85- {
86- BOOST_STATIC_CONSTANT (bool , value = false );
87- };
88-
89- template <class T >
90- struct is_reference_to_const <T const &>
91- {
92- BOOST_STATIC_CONSTANT (bool , value = true );
93- };
94-
95- template <class T >
96- struct is_reference_to_volatile
97- {
98- BOOST_STATIC_CONSTANT (bool , value = false );
99- };
100-
101- template <class T >
102- struct is_reference_to_volatile <T volatile &>
103- {
104- BOOST_STATIC_CONSTANT (bool , value = true );
105- };
106- # else
107- template <typename V>
108- struct is_const_help
109- {
110- typedef typename mpl::select_type<
111- is_const<V>::value
112- , type_traits::yes_type
113- , type_traits::no_type
114- >::type type;
115- };
116-
117- template <typename V>
118- struct is_volatile_help
119- {
120- typedef typename mpl::select_type<
121- is_volatile<V>::value
122- , type_traits::yes_type
123- , type_traits::no_type
124- >::type type;
125- };
126-
127- template <typename V>
128- typename is_const_help<V>::type reference_to_const_helper (V&);
129-
130- type_traits::no_type
131- reference_to_const_helper (...);
132-
133- template <class T >
134- struct is_reference_to_const
135- {
136- static T t;
137- BOOST_STATIC_CONSTANT (
138- bool , value
139- = sizeof (reference_to_const_helper(t)) == sizeof (type_traits::yes_type));
140- };
141-
142- template <typename V>
143- typename is_volatile_help<V>::type reference_to_volatile_helper (V&);
144- type_traits::no_type reference_to_volatile_helper (...);
145-
146- template <class T >
147- struct is_reference_to_volatile
148- {
149- static T t;
150- BOOST_STATIC_CONSTANT (
151- bool , value
152- = sizeof (reference_to_volatile_helper(t)) == sizeof (type_traits::yes_type));
153- };
154- # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
155-
15680template <class T >
15781inline undecorated_type_id_t undecorated_type_id (detail::dummy<T>* = 0 )
15882{
@@ -165,9 +89,9 @@ inline type_id_t type_id(detail::dummy<T>* = 0)
16589 return type_id_t (
16690 undecorated_type_id<T>()
16791 , type_id_t::decoration (
168- (is_const<T>::value || is_reference_to_const<T>::value
92+ (is_const<T>::value || python::detail:: is_reference_to_const<T>::value
16993 ? type_id_t ::const_ : 0 )
170- | (is_volatile<T>::value || is_reference_to_volatile<T>::value
94+ | (is_volatile<T>::value || python::detail:: is_reference_to_volatile<T>::value
17195 ? type_id_t ::volatile_ : 0 )
17296 | (is_reference<T>::value ? type_id_t ::reference : 0 )
17397 )
0 commit comments