Line | |
---|
1 | // Copyright David Abrahams 2004. Distributed under the Boost
|
---|
2 | // Software License, Version 1.0. (See accompanying
|
---|
3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
4 | #ifndef UNWRAP_WRAPPER_DWA2004723_HPP
|
---|
5 | # define UNWRAP_WRAPPER_DWA2004723_HPP
|
---|
6 |
|
---|
7 | # include <boost/python/detail/prefix.hpp>
|
---|
8 | # include <boost/python/detail/is_wrapper.hpp>
|
---|
9 | # if defined(BOOST_PYTHON_NO_SFINAE)
|
---|
10 | # include <boost/mpl/eval_if.hpp>
|
---|
11 | # include <boost/mpl/identity.hpp>
|
---|
12 | # else
|
---|
13 | # include <boost/python/detail/enable_if.hpp>
|
---|
14 | # endif
|
---|
15 |
|
---|
16 | namespace boost { namespace python { namespace detail {
|
---|
17 |
|
---|
18 | # if defined(BOOST_PYTHON_NO_SFINAE)
|
---|
19 | template <class T>
|
---|
20 | struct unwrap_wrapper_helper
|
---|
21 | {
|
---|
22 | typedef typename T::_wrapper_wrapped_type_ type;
|
---|
23 | };
|
---|
24 |
|
---|
25 | template <class T>
|
---|
26 | typename mpl::eval_if<is_wrapper<T>,unwrap_wrapper_helper<T>,mpl::identity<T> >::type*
|
---|
27 | unwrap_wrapper(T*)
|
---|
28 | {
|
---|
29 | return 0;
|
---|
30 | }
|
---|
31 | # else
|
---|
32 | template <class T>
|
---|
33 | typename disable_if_ret<is_wrapper<T>,T*>::type
|
---|
34 | unwrap_wrapper(T*)
|
---|
35 | {
|
---|
36 | return 0;
|
---|
37 | }
|
---|
38 |
|
---|
39 | template <class T>
|
---|
40 | T* unwrap_wrapper(wrapper<T>*)
|
---|
41 | {
|
---|
42 | return 0;
|
---|
43 | }
|
---|
44 | # endif
|
---|
45 |
|
---|
46 | }}} // namespace boost::python::detail
|
---|
47 |
|
---|
48 | #endif // UNWRAP_WRAPPER_DWA2004723_HPP
|
---|
Note: See
TracBrowser
for help on using the repository browser.