return_by_value.hpp 724 B

123456789101112131415161718192021222324252627282930
  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 BY_VALUE_DWA20021015_HPP
  6. # define BY_VALUE_DWA20021015_HPP
  7. # include <boost/python/detail/prefix.hpp>
  8. # include <boost/python/to_python_value.hpp>
  9. # include <boost/python/detail/type_traits.hpp>
  10. # include <boost/python/detail/value_arg.hpp>
  11. namespace boost { namespace python {
  12. struct return_by_value
  13. {
  14. template <class R>
  15. struct apply
  16. {
  17. typedef to_python_value<
  18. typename detail::value_arg<R>::type
  19. > type;
  20. };
  21. };
  22. }} // namespace boost::python
  23. #endif // BY_VALUE_DWA20021015_HPP