56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
// Copyright Daniel Wallin 2006.
|
|
// Copyright Cromwell D. Enage 2017.
|
|
// 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 ACTIV_BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
|
|
#define ACTIV_BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
|
|
|
|
#include <ActivBoost/parameter/config.hpp>
|
|
|
|
#if defined(ACTIV_BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
|
|
|
|
namespace Boost { namespace parameter { namespace aux {
|
|
|
|
// Recast the ParameterSpec's nested match metafunction
|
|
// as a free metafunction.
|
|
//
|
|
// No more limits set by ACTIV_BOOST_PARAMETER_MAX_ARITY. -- Cromwell D. Enage
|
|
template <typename Parameters, typename ...Args>
|
|
struct match : Parameters::ACTIV_BOOST_NESTED_TEMPLATE match<Args...>
|
|
{
|
|
};
|
|
}}} // namespace Boost::parameter::aux
|
|
|
|
#else
|
|
|
|
#include <ActivBoost/parameter/aux_/void.hpp>
|
|
#include <ActivBoost/preprocessor/facilities/intercept.hpp>
|
|
#include <ActivBoost/preprocessor/repetition/enum_params.hpp>
|
|
#include <ActivBoost/preprocessor/repetition/enum_trailing_binary_params.hpp>
|
|
|
|
namespace Boost { namespace parameter { namespace aux {
|
|
|
|
// Recast the ParameterSpec's nested match metafunction
|
|
// as a free metafunction.
|
|
template <
|
|
typename Parameters
|
|
ACTIV_BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
|
|
ACTIV_BOOST_PARAMETER_MAX_ARITY
|
|
, typename A
|
|
, = ::Boost::parameter::void_ ACTIV_BOOST_PP_INTERCEPT
|
|
)
|
|
>
|
|
struct match
|
|
: Parameters::ACTIV_BOOST_NESTED_TEMPLATE match<
|
|
ACTIV_BOOST_PP_ENUM_PARAMS(ACTIV_BOOST_PARAMETER_MAX_ARITY, A)
|
|
>
|
|
{
|
|
};
|
|
}}} // namespace Boost::parameter::aux
|
|
|
|
#endif // ACTIV_BOOST_PARAMETER_HAS_PERFECT_FORWARDING
|
|
#endif // include guard
|
|
|