blob: d89bcc5400cbafec10feb9a4f4afacb9291bc9ce [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
Jeff Thompson3d613fd2013-10-15 15:39:04 -07002#if !defined(NDNBOOST_PP_IS_ITERATING)
Jeff Thompsona28eed82013-08-22 16:21:10 -07003
4///// header body
5
Jeff Thompson3d613fd2013-10-15 15:39:04 -07006#ifndef NDNBOOST_MPL_BIND_FWD_HPP_INCLUDED
7#define NDNBOOST_MPL_BIND_FWD_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -07008
9// Copyright Aleksey Gurtovoy 2000-2004
10//
11// Distributed under the Boost Software License, Version 1.0.
12// (See accompanying file LICENSE_1_0.txt or copy at
13// http://www.boost.org/LICENSE_1_0.txt)
14//
15// See http://www.boost.org/libs/mpl for documentation.
16
17// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
18// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
19// $Revision: 49267 $
20
Jeff Thompson3d613fd2013-10-15 15:39:04 -070021#if !defined(NDNBOOST_MPL_PREPROCESSING_MODE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070022# include <ndnboost/mpl/aux_/na.hpp>
23#endif
24
25#include <ndnboost/mpl/aux_/config/bind.hpp>
26#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
27
Jeff Thompson3d613fd2013-10-15 15:39:04 -070028#if !defined(NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
29 && !defined(NDNBOOST_MPL_PREPROCESSING_MODE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070030
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031# define NDNBOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp
Jeff Thompsona28eed82013-08-22 16:21:10 -070032# include <ndnboost/mpl/aux_/include_preprocessed.hpp>
33
34#else
35
36# include <ndnboost/mpl/limits/arity.hpp>
37# include <ndnboost/mpl/aux_/preprocessor/params.hpp>
38# include <ndnboost/mpl/aux_/preprocessor/default_params.hpp>
39# include <ndnboost/mpl/aux_/config/dmc_ambiguous_ctps.hpp>
40
41# include <ndnboost/preprocessor/comma_if.hpp>
42# include <ndnboost/preprocessor/iterate.hpp>
43# include <ndnboost/preprocessor/cat.hpp>
44
45namespace ndnboost { namespace mpl {
46
47// local macros, #undef-ined at the end of the header
48
Jeff Thompson3d613fd2013-10-15 15:39:04 -070049# if defined(NDNBOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
Jeff Thompsona28eed82013-08-22 16:21:10 -070050# define AUX778076_DMC_PARAM() , int dummy_ = 0
51# else
52# define AUX778076_DMC_PARAM()
53# endif
54
55# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \
Jeff Thompson3d613fd2013-10-15 15:39:04 -070056 NDNBOOST_MPL_PP_DEFAULT_PARAMS( \
57 NDNBOOST_MPL_LIMIT_METAFUNCTION_ARITY \
Jeff Thompsona28eed82013-08-22 16:21:10 -070058 , param \
59 , value \
60 ) \
61 AUX778076_DMC_PARAM() \
62 /**/
63
64# define AUX778076_BIND_N_PARAMS(n, param) \
Jeff Thompson3d613fd2013-10-15 15:39:04 -070065 NDNBOOST_PP_COMMA_IF(n) NDNBOOST_MPL_PP_PARAMS(n, param) \
Jeff Thompsona28eed82013-08-22 16:21:10 -070066 AUX778076_DMC_PARAM() \
67 /**/
68
Jeff Thompson3d613fd2013-10-15 15:39:04 -070069#if !defined(NDNBOOST_MPL_CFG_NO_BIND_TEMPLATE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070070template<
71 typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na)
72 >
73struct bind;
74#endif
75
Jeff Thompson3d613fd2013-10-15 15:39:04 -070076#define NDNBOOST_PP_ITERATION_PARAMS_1 \
77 (3,(0, NDNBOOST_MPL_LIMIT_METAFUNCTION_ARITY, <ndnboost/mpl/bind_fwd.hpp>))
78#include NDNBOOST_PP_ITERATE()
Jeff Thompsona28eed82013-08-22 16:21:10 -070079
80# undef AUX778076_BIND_N_PARAMS
81# undef AUX778076_BIND_DEFAULT_PARAMS
82# undef AUX778076_DMC_PARAM
83}}
84
Jeff Thompson3d613fd2013-10-15 15:39:04 -070085#endif // NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
86#endif // NDNBOOST_MPL_BIND_FWD_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -070087
88///// iteration
89
90#else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070091#define i_ NDNBOOST_PP_FRAME_ITERATION(1)
Jeff Thompsona28eed82013-08-22 16:21:10 -070092
93template<
94 typename F AUX778076_BIND_N_PARAMS(i_, typename T)
95 >
Jeff Thompson3d613fd2013-10-15 15:39:04 -070096struct NDNBOOST_PP_CAT(bind,i_);
Jeff Thompsona28eed82013-08-22 16:21:10 -070097
98#undef i_
Jeff Thompson3d613fd2013-10-15 15:39:04 -070099#endif // NDNBOOST_PP_IS_ITERATING