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 COPY_NON_CONST_REFERENCE_DWA2002131_HPP 6 # define COPY_NON_CONST_REFERENCE_DWA2002131_HPP 7 8 # include <boost/python/detail/prefix.hpp> 9 # include <boost/python/detail/indirect_traits.hpp> 10 # include <boost/mpl/if.hpp> 11 # include <boost/python/to_python_value.hpp> 12 13 namespace boost { namespace python { 14 15 namespace detail 16 { 17 template <class R> 18 struct copy_non_const_reference_expects_a_non_const_reference_return_type 19 # if defined(__GNUC__) || defined(__EDG__) 20 {} 21 # endif 22 ; 23 } 24 25 template <class T> struct to_python_value; 26 27 struct copy_non_const_reference 28 { 29 template <class T> 30 struct apply 31 { 32 typedef typename mpl::if_c< 33 indirect_traits::is_reference_to_non_const<T>::value 34 , to_python_value<T> 35 , detail::copy_non_const_reference_expects_a_non_const_reference_return_type<T> 36 >::type type; 37 }; 38 }; 39 40 41 }} // namespace boost::python 42 43 #endif // COPY_NON_CONST_REFERENCE_DWA2002131_HPP 44