param.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright Oliver Kowalke 2009.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_COROUTINES_DETAIL_PARAM_H
  6. #define BOOST_COROUTINES_DETAIL_PARAM_H
  7. #include <boost/config.hpp>
  8. #include <boost/mpl/eval_if.hpp>
  9. #include <boost/mpl/identity.hpp>
  10. #include <boost/mpl/or.hpp>
  11. #include <boost/type_traits/add_reference.hpp>
  12. #include <boost/type_traits/is_reference.hpp>
  13. #include <boost/type_traits/is_scalar.hpp>
  14. #include <boost/type_traits/is_stateless.hpp>
  15. #ifdef BOOST_HAS_ABI_HEADERS
  16. # include BOOST_ABI_PREFIX
  17. #endif
  18. namespace boost {
  19. namespace coroutines {
  20. namespace detail {
  21. template< typename T >
  22. struct param :
  23. public mpl::eval_if<
  24. mpl::or_<
  25. is_scalar< T >,
  26. is_stateless< T >,
  27. is_reference< T >
  28. >,
  29. mpl::identity< T >,
  30. add_reference< T >
  31. >
  32. {};
  33. }}}
  34. #ifdef BOOST_HAS_ABI_HEADERS
  35. # include BOOST_ABI_SUFFIX
  36. #endif
  37. #endif // BOOST_COROUTINES_DETAIL_PARAM_H