Update contrib.
1 #ifndef OTHER_DWA20020601_HPP
2 # define OTHER_DWA20020601_HPP
4 # include <boost/python/detail/prefix.hpp>
5 // Copyright David Abrahams 2002.
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 # if _MSC_VER+0 >= 1020
14 # include <boost/config.hpp>
16 namespace boost { namespace python {
18 template<class T> struct other
23 # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
30 BOOST_STATIC_CONSTANT(bool, value = false);
34 class is_other<other<T> >
37 BOOST_STATIC_CONSTANT(bool, value = true);
48 class unwrap_other<other<T> >
54 # else // no partial specialization
56 }} // namespace boost::python
58 #include <boost/type.hpp>
60 namespace boost { namespace python {
64 typedef char (&yes_other_t)[1];
65 typedef char (&no_other_t)[2];
67 no_other_t is_other_test(...);
70 yes_other_t is_other_test(type< other<T> >);
72 template<bool wrapped>
73 struct other_unwrapper
83 struct other_unwrapper<true>
88 typedef typename T::type type;
96 BOOST_STATIC_CONSTANT(
98 sizeof(detail::is_other_test(type<T>()))
99 == sizeof(detail::yes_other_t)));
102 template <typename T>
104 : public detail::other_unwrapper<
110 # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
112 }} // namespace boost::python
114 #endif // #ifndef OTHER_DWA20020601_HPP