item.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright David Abrahams, Daniel Wallin 2003.
  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_PARAMETER_AUX_PACK_ITEM_HPP
  6. #define BOOST_PARAMETER_AUX_PACK_ITEM_HPP
  7. #include <boost/parameter/aux_/void.hpp>
  8. #include <boost/config.hpp>
  9. #include <boost/config/workaround.hpp>
  10. #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
  11. #include <boost/type_traits/is_const.hpp>
  12. #include <boost/type_traits/remove_reference.hpp>
  13. #endif
  14. namespace boost { namespace parameter { namespace aux {
  15. // A parameter spec item typelist.
  16. template <
  17. typename Spec
  18. , typename Arg
  19. , typename Tail = ::boost::parameter::void_
  20. >
  21. struct item
  22. {
  23. typedef Spec spec;
  24. #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
  25. typedef ::boost::is_const<
  26. typename ::boost::remove_reference<Arg>::type
  27. > is_arg_const;
  28. #endif
  29. typedef Arg arg;
  30. typedef Tail tail;
  31. };
  32. template <typename Spec, typename Arg, typename Tail>
  33. struct make_item
  34. {
  35. typedef boost::parameter::aux
  36. ::item<Spec,Arg,typename Tail::type> type;
  37. };
  38. }}} // namespace boost::parameter::aux
  39. #endif // include guard