Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:49:59

0001 // Copyright David Abrahams, Daniel Wallin 2003.
0002 // Distributed under the Boost Software License, Version 1.0.
0003 // (See accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_PARAMETER_REQUIRED_HPP
0007 #define BOOST_PARAMETER_REQUIRED_HPP
0008 
0009 #include <boost/parameter/aux_/use_default.hpp>
0010 
0011 namespace boost { namespace parameter {
0012 
0013     // This metafunction can be used to describe the treatment of particular
0014     // named parameters for the purposes of overload elimination with SFINAE,
0015     // by placing specializations in the parameters<...> list.  In order for
0016     // a treated function to participate in overload resolution:
0017     //
0018     //   - all keyword tags wrapped in required<...> must have a matching
0019     //     actual argument
0020     //
0021     //   - The actual argument type matched by every keyword tag
0022     //     associated with a predicate must satisfy that predicate
0023     template <
0024         typename Tag
0025       , typename Predicate = ::boost::parameter::aux::use_default
0026     >
0027     struct required
0028     {
0029         typedef Tag key_type;
0030         typedef Predicate predicate;
0031     };
0032 }}
0033 
0034 #include <boost/parameter/config.hpp>
0035 
0036 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0037 #include <boost/mp11/integral.hpp>
0038 #else
0039 #include <boost/mpl/bool.hpp>
0040 #endif
0041 
0042 namespace boost { namespace parameter { namespace aux {
0043 
0044     template <typename T>
0045     struct is_required
0046 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0047       : ::boost::mp11::mp_false
0048 #else
0049       : ::boost::mpl::false_
0050 #endif
0051     {
0052     };
0053 
0054     template <typename Tag, typename Predicate>
0055     struct is_required< ::boost::parameter::required<Tag,Predicate> >
0056 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0057       : ::boost::mp11::mp_true
0058 #else
0059       : ::boost::mpl::true_
0060 #endif
0061     {
0062     };
0063 }}} // namespace boost::parameter::aux
0064 
0065 #endif  // include guard
0066