1 #ifndef PTR_DWA20020601_HPP
2 # define PTR_DWA20020601_HPP
4 # include <boost/python/detail/prefix.hpp>
5 // Copyright David Abrahams 2002.
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 // Based on boost/ref.hpp, thus:
11 // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
12 // Copyright (C) 2001 Peter Dimov
16 # include <boost/config.hpp>
17 # include <boost/mpl/bool.hpp>
19 namespace boost { namespace python {
21 template<class Ptr> class pointer_wrapper
26 explicit pointer_wrapper(Ptr x): p_(x) {}
27 operator Ptr() const { return p_; }
28 Ptr get() const { return p_; }
34 inline pointer_wrapper<T> ptr(T t)
36 return pointer_wrapper<T>(t);
40 class is_pointer_wrapper
46 class is_pointer_wrapper<pointer_wrapper<T> >
59 class unwrap_pointer<pointer_wrapper<T> >
65 }} // namespace boost::python
67 #endif // #ifndef PTR_DWA20020601_HPP