File indexing completed on 2025-01-18 09:50:37
0001
0002
0003
0004
0005 #ifndef CONSTRUCT_REFERENCE_DWA2002716_HPP
0006 # define CONSTRUCT_REFERENCE_DWA2002716_HPP
0007
0008 namespace boost { namespace python { namespace detail {
0009
0010 template <class T, class Arg>
0011 void construct_pointee(void* storage, Arg& x, T const volatile*)
0012 {
0013 new (storage) T(x);
0014 }
0015
0016 template <class T, class Arg>
0017 void construct_referent_impl(void* storage, Arg& x, T&(*)())
0018 {
0019 construct_pointee(storage, x, (T*)0);
0020 }
0021
0022 template <class T, class Arg>
0023 void construct_referent(void* storage, Arg const& x, T(*tag)() = 0)
0024 {
0025 construct_referent_impl(storage, x, tag);
0026 }
0027
0028 template <class T, class Arg>
0029 void construct_referent(void* storage, Arg& x, T(*tag)() = 0)
0030 {
0031 construct_referent_impl(storage, x, tag);
0032 }
0033
0034 }}}
0035
0036 #endif