Chris@16: // Copyright David Abrahams 2004. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: #ifndef IS_WRAPPER_DWA2004723_HPP Chris@16: # define IS_WRAPPER_DWA2004723_HPP Chris@16: Chris@16: # include Chris@16: # include Chris@16: Chris@16: namespace boost { namespace python { Chris@16: Chris@16: template class wrapper; Chris@16: Chris@16: namespace detail Chris@16: { Chris@16: typedef char (&is_not_wrapper)[2]; Chris@16: is_not_wrapper is_wrapper_helper(...); Chris@16: template Chris@16: char is_wrapper_helper(wrapper const volatile*); Chris@16: Chris@16: // A metafunction returning true iff T is [derived from] wrapper Chris@16: template Chris@16: struct is_wrapper Chris@16: : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)> Chris@16: {}; Chris@16: Chris@16: }}} // namespace boost::python::detail Chris@16: Chris@16: #endif // IS_WRAPPER_DWA2004723_HPP