fix doc example typo
[boost.git] / boost / python / copy_const_reference.hpp
blob19e3b42332d7f0414dce1e6b456dcc656b94a04b
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_CONST_REFERENCE_DWA2002131_HPP
6 # define COPY_CONST_REFERENCE_DWA2002131_HPP
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>
13 namespace boost { namespace python {
15 namespace detail
17 template <class R>
18 struct copy_const_reference_expects_a_const_reference_return_type
19 # if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
21 # endif
25 template <class T> struct to_python_value;
27 struct copy_const_reference
29 template <class T>
30 struct apply
32 typedef typename mpl::if_c<
33 indirect_traits::is_reference_to_const<T>::value
34 , to_python_value<T>
35 , detail::copy_const_reference_expects_a_const_reference_return_type<T>
36 >::type type;
41 }} // namespace boost::python
43 #endif // COPY_CONST_REFERENCE_DWA2002131_HPP