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 IS_WRAPPER_DWA2004723_HPP
5 # define IS_WRAPPER_DWA2004723_HPP
7 # include <boost/python/detail/prefix.hpp>
8 # include <boost/mpl/bool.hpp>
10 namespace boost { namespace python {
12 template <class T> class wrapper;
16 typedef char (&is_not_wrapper)[2];
17 is_not_wrapper is_wrapper_helper(...);
19 char is_wrapper_helper(wrapper<T> const volatile*);
21 // A metafunction returning true iff T is [derived from] wrapper<U>
24 : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)>
27 }}} // namespace boost::python::detail
29 #endif // IS_WRAPPER_DWA2004723_HPP