as_parameter_requirements.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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_AS_PARAMETER_REQUIREMENTS_HPP
  6. #define BOOST_PARAMETER_AUX_PACK_AS_PARAMETER_REQUIREMENTS_HPP
  7. #include <boost/parameter/aux_/pack/parameter_requirements.hpp>
  8. #include <boost/parameter/aux_/pack/tag_type.hpp>
  9. #include <boost/parameter/aux_/pack/predicate.hpp>
  10. #include <boost/parameter/deduced.hpp>
  11. namespace boost { namespace parameter { namespace aux {
  12. // Converts a ParameterSpec into a specialization of
  13. // parameter_requirements. We need to do this in order to get the
  14. // tag_type into the type in a way that can be conveniently matched
  15. // by a satisfies(...) member function in arg_list.
  16. template <typename ParameterSpec>
  17. struct as_parameter_requirements
  18. {
  19. typedef ::boost::parameter::aux::parameter_requirements<
  20. typename ::boost::parameter::aux::tag_type<ParameterSpec>::type
  21. , typename ::boost::parameter::aux::predicate<ParameterSpec>::type
  22. , ::boost::parameter::aux::has_default<ParameterSpec>
  23. > type;
  24. };
  25. }}} // namespace boost::parameter::aux
  26. #endif // include guard