Update contrib.
1 // Copyright David Abrahams 2005. Distributed under the Boost
2 // Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4 #ifndef BOOST_PARAMETER_MATCH_DWA2005714_HPP
5 # define BOOST_PARAMETER_MATCH_DWA2005714_HPP
7 # include <boost/detail/workaround.hpp>
8 # include <boost/preprocessor/seq/enum.hpp>
10 # if BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
11 // Temporary version of BOOST_PP_SEQ_ENUM until Paul M. integrates the workaround.
12 # define BOOST_PARAMETER_SEQ_ENUM_I(size,seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq
13 # define BOOST_PARAMETER_SEQ_ENUM(seq) BOOST_PARAMETER_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq)
15 # define BOOST_PARAMETER_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM(seq)
18 # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
20 # include <boost/parameter/config.hpp>
21 # include <boost/parameter/aux_/void.hpp>
22 # include <boost/preprocessor/arithmetic/sub.hpp>
23 # include <boost/preprocessor/facilities/intercept.hpp>
24 # include <boost/preprocessor/repetition/enum_trailing_params.hpp>
26 # define BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes) \
27 BOOST_PP_ENUM_TRAILING_PARAMS( \
29 BOOST_PARAMETER_MAX_ARITY \
30 , BOOST_PP_SEQ_SIZE(ArgTypes) \
32 , ::boost::parameter::void_ BOOST_PP_INTERCEPT \
37 # define BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes)
44 // typename dfs_params::match<A1,A2>::type name = dfs_params()
46 // with workarounds for Borland compatibility.
49 # define BOOST_PARAMETER_MATCH(ParameterSpec, ArgTypes, name) \
50 typename ParameterSpec ::match< \
51 BOOST_PARAMETER_SEQ_ENUM(ArgTypes) \
52 BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes) \
53 >::type name = ParameterSpec ()
55 #endif // BOOST_PARAMETER_MATCH_DWA2005714_HPP