annotate DEPENDENCIES/generic/include/boost/python/detail/is_wrapper.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Copyright David Abrahams 2004. Distributed under the Boost
Chris@16 2 // Software License, Version 1.0. (See accompanying
Chris@16 3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 4 #ifndef IS_WRAPPER_DWA2004723_HPP
Chris@16 5 # define IS_WRAPPER_DWA2004723_HPP
Chris@16 6
Chris@16 7 # include <boost/python/detail/prefix.hpp>
Chris@16 8 # include <boost/mpl/bool.hpp>
Chris@16 9
Chris@16 10 namespace boost { namespace python {
Chris@16 11
Chris@16 12 template <class T> class wrapper;
Chris@16 13
Chris@16 14 namespace detail
Chris@16 15 {
Chris@16 16 typedef char (&is_not_wrapper)[2];
Chris@16 17 is_not_wrapper is_wrapper_helper(...);
Chris@16 18 template <class T>
Chris@16 19 char is_wrapper_helper(wrapper<T> const volatile*);
Chris@16 20
Chris@16 21 // A metafunction returning true iff T is [derived from] wrapper<U>
Chris@16 22 template <class T>
Chris@16 23 struct is_wrapper
Chris@16 24 : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)>
Chris@16 25 {};
Chris@16 26
Chris@16 27 }}} // namespace boost::python::detail
Chris@16 28
Chris@16 29 #endif // IS_WRAPPER_DWA2004723_HPP