Release 1.39.0
[boost.git] / Boost_1_39_0 / boost / python / detail / value_arg.hpp
blob747588d6fd69248f84aeef322332898bea561726
1 // Copyright David Abrahams 2004. Distributed under the Boost
2 // Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4 #ifndef VALUE_ARG_DWA2004312_HPP
5 # define VALUE_ARG_DWA2004312_HPP
7 # include <boost/python/detail/copy_ctor_mutates_rhs.hpp>
8 # include <boost/mpl/if.hpp>
9 # include <boost/type_traits/add_reference.hpp>
10 # include <boost/type_traits/add_const.hpp>
12 namespace boost { namespace python { namespace detail {
14 template <class T>
15 struct value_arg
16 : mpl::if_<
17 copy_ctor_mutates_rhs<T>
18 , T
19 , typename add_reference<
20 typename add_const<T>::type
21 >::type
23 {};
25 }}} // namespace boost::python::detail
27 #endif // VALUE_ARG_DWA2004312_HPP