Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/python/pointee.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 // Copyright David Abrahams 2002. | |
2 // Distributed under the Boost Software License, Version 1.0. (See | |
3 // accompanying file LICENSE_1_0.txt or copy at | |
4 // http://www.boost.org/LICENSE_1_0.txt) | |
5 #ifndef POINTEE_DWA2002323_HPP | |
6 # define POINTEE_DWA2002323_HPP | |
7 | |
8 # include <boost/python/detail/prefix.hpp> | |
9 | |
10 # include <boost/type_traits/object_traits.hpp> | |
11 # include <boost/type_traits/remove_pointer.hpp> | |
12 | |
13 namespace boost { namespace python { | |
14 | |
15 namespace detail | |
16 { | |
17 template <bool is_ptr = true> | |
18 struct pointee_impl | |
19 { | |
20 template <class T> struct apply : remove_pointer<T> {}; | |
21 }; | |
22 | |
23 template <> | |
24 struct pointee_impl<false> | |
25 { | |
26 template <class T> struct apply | |
27 { | |
28 typedef typename T::element_type type; | |
29 }; | |
30 }; | |
31 } | |
32 | |
33 template <class T> | |
34 struct pointee | |
35 : detail::pointee_impl< | |
36 ::boost::is_pointer<T>::value | |
37 >::template apply<T> | |
38 { | |
39 }; | |
40 | |
41 }} // namespace boost::python::detail | |
42 | |
43 #endif // POINTEE_DWA2002323_HPP |