Sha256: 66c34069a16e0d0f287fc5dad3faf169b847986a09a54b53d56efa0e518a485d

Contents?: true

Size: 1.79 KB

Versions: 17

Compression:

Stored size: 1.79 KB

Contents

// Copyright David Abrahams, Daniel Wallin 2003.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_PARAMETER_REQUIRED_HPP
#define BOOST_PARAMETER_REQUIRED_HPP

#include <boost/parameter/aux_/use_default.hpp>

namespace boost { namespace parameter {

    // This metafunction can be used to describe the treatment of particular
    // named parameters for the purposes of overload elimination with SFINAE,
    // by placing specializations in the parameters<...> list.  In order for
    // a treated function to participate in overload resolution:
    //
    //   - all keyword tags wrapped in required<...> must have a matching
    //     actual argument
    //
    //   - The actual argument type matched by every keyword tag
    //     associated with a predicate must satisfy that predicate
    template <
        typename Tag
      , typename Predicate = ::boost::parameter::aux::use_default
    >
    struct required
    {
        typedef Tag key_type;
        typedef Predicate predicate;
    };
}}

#include <boost/parameter/config.hpp>

#if defined(BOOST_PARAMETER_CAN_USE_MP11)
#include <boost/mp11/integral.hpp>
#else
#include <boost/mpl/bool.hpp>
#endif

namespace boost { namespace parameter { namespace aux {

    template <typename T>
    struct is_required
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
      : ::boost::mp11::mp_false
#else
      : ::boost::mpl::false_
#endif
    {
    };

    template <typename Tag, typename Predicate>
    struct is_required< ::boost::parameter::required<Tag,Predicate> >
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
      : ::boost::mp11::mp_true
#else
      : ::boost::mpl::true_
#endif
    {
    };
}}} // namespace boost::parameter::aux

#endif  // include guard

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
passenger-6.0.26 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.25 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/parameter/required.hpp