]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
1 | #ifndef BOOST_PYTHON_OTHER_HPP |
2 | # define BOOST_PYTHON_OTHER_HPP | |
7c673cae FG |
3 | |
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) | |
9 | ||
7c673cae FG |
10 | # include <boost/config.hpp> |
11 | ||
12 | namespace boost { namespace python { | |
13 | ||
14 | template<class T> struct other | |
15 | { | |
16 | typedef T type; | |
17 | }; | |
18 | ||
19 | namespace detail | |
20 | { | |
21 | template<typename T> | |
22 | class is_other | |
23 | { | |
24 | public: | |
25 | BOOST_STATIC_CONSTANT(bool, value = false); | |
26 | }; | |
27 | ||
28 | template<typename T> | |
29 | class is_other<other<T> > | |
30 | { | |
31 | public: | |
32 | BOOST_STATIC_CONSTANT(bool, value = true); | |
33 | }; | |
34 | ||
35 | template<typename T> | |
36 | class unwrap_other | |
37 | { | |
38 | public: | |
39 | typedef T type; | |
40 | }; | |
41 | ||
42 | template<typename T> | |
43 | class unwrap_other<other<T> > | |
44 | { | |
45 | public: | |
46 | typedef T type; | |
47 | }; | |
48 | } | |
49 | ||
50 | }} // namespace boost::python | |
51 | ||
92f5a8d4 | 52 | #endif |