File indexing completed on 2025-01-18 09:50:38
0001
0002
0003
0004
0005 #ifndef VOID_PTR_DWA200239_HPP
0006 # define VOID_PTR_DWA200239_HPP
0007
0008 # include <boost/python/detail/type_traits.hpp>
0009
0010 namespace boost { namespace python { namespace detail {
0011
0012 template <class U>
0013 inline U& void_ptr_to_reference(void const volatile* p, U&(*)())
0014 {
0015 return *(U*)p;
0016 }
0017
0018 template <class T>
0019 inline void write_void_ptr(void const volatile* storage, void* ptr, T*)
0020 {
0021 *(T**)storage = (T*)ptr;
0022 }
0023
0024
0025 template <class U>
0026 inline void write_void_ptr_reference(void const volatile* storage, void* ptr, U&(*)())
0027 {
0028
0029 typedef typename remove_cv<U>::type u_stripped;
0030 write_void_ptr(storage, ptr, u_stripped(0));
0031 }
0032
0033 }}}
0034
0035 #endif