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)
6 #ifndef BOOST_PARAMETER_REQUIRED_HPP
7 #define BOOST_PARAMETER_REQUIRED_HPP
9 #include <boost/parameter/aux_/use_default.hpp>
11 namespace boost { namespace parameter {
13 // This metafunction can be used to describe the treatment of particular
14 // named parameters for the purposes of overload elimination with SFINAE,
15 // by placing specializations in the parameters<...> list. In order for
16 // a treated function to participate in overload resolution:
18 // - all keyword tags wrapped in required<...> must have a matching
21 // - The actual argument type matched by every keyword tag
22 // associated with a predicate must satisfy that predicate
25 , typename Predicate = ::boost::parameter::aux::use_default
30 typedef Predicate predicate;
34 #include <boost/parameter/config.hpp>
36 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
37 #include <boost/mp11/integral.hpp>
39 #include <boost/mpl/bool.hpp>
42 namespace boost { namespace parameter { namespace aux {
46 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
47 : ::boost::mp11::mp_false
49 : ::boost::mpl::false_
54 template <typename Tag, typename Predicate>
55 struct is_required< ::boost::parameter::required<Tag,Predicate> >
56 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
57 : ::boost::mp11::mp_true
63 }}} // namespace boost::parameter::aux
65 #endif // include guard