Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:37

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
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 }}} // namespace boost::python::detail
0035 
0036 #endif // CONSTRUCT_REFERENCE_DWA2002716_HPP