os/ossrv/ossrv_pub/boost_apis/boost/mpl/apply_fwd.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
#if !defined(BOOST_PP_IS_ITERATING)
sl@0
     3
sl@0
     4
///// header body
sl@0
     5
sl@0
     6
#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED
sl@0
     7
#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED
sl@0
     8
sl@0
     9
// Copyright Aleksey Gurtovoy 2000-2004
sl@0
    10
//
sl@0
    11
// Distributed under the Boost Software License, Version 1.0. 
sl@0
    12
// (See accompanying file LICENSE_1_0.txt or copy at 
sl@0
    13
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    14
//
sl@0
    15
// See http://www.boost.org/libs/mpl for documentation.
sl@0
    16
sl@0
    17
// $Source: /cvsroot/boost/boost/boost/mpl/apply_fwd.hpp,v $
sl@0
    18
// $Date: 2005/08/25 16:27:21 $
sl@0
    19
// $Revision: 1.3 $
sl@0
    20
sl@0
    21
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
sl@0
    22
#   include <boost/mpl/aux_/na.hpp>
sl@0
    23
#endif
sl@0
    24
sl@0
    25
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
sl@0
    26
sl@0
    27
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
sl@0
    28
    && !defined(BOOST_MPL_PREPROCESSING_MODE)
sl@0
    29
sl@0
    30
#   define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
sl@0
    31
#   include <boost/mpl/aux_/include_preprocessed.hpp>
sl@0
    32
sl@0
    33
#else
sl@0
    34
sl@0
    35
#   include <boost/mpl/limits/arity.hpp>
sl@0
    36
#   include <boost/mpl/aux_/preprocessor/params.hpp>
sl@0
    37
#   include <boost/mpl/aux_/preprocessor/default_params.hpp>
sl@0
    38
#   include <boost/mpl/aux_/config/ctps.hpp>
sl@0
    39
#   include <boost/mpl/aux_/nttp_decl.hpp>
sl@0
    40
sl@0
    41
#   include <boost/preprocessor/comma_if.hpp>
sl@0
    42
#   include <boost/preprocessor/iterate.hpp>
sl@0
    43
#   include <boost/preprocessor/cat.hpp>
sl@0
    44
sl@0
    45
// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC
sl@0
    46
// (for known reasons)
sl@0
    47
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
sl@0
    48
#   define BOOST_MPL_CFG_NO_APPLY_TEMPLATE
sl@0
    49
#endif
sl@0
    50
sl@0
    51
namespace boost { namespace mpl {
sl@0
    52
sl@0
    53
// local macro, #undef-ined at the end of the header
sl@0
    54
#   define AUX778076_APPLY_DEF_PARAMS(param, value) \
sl@0
    55
    BOOST_MPL_PP_DEFAULT_PARAMS( \
sl@0
    56
          BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
sl@0
    57
        , param \
sl@0
    58
        , value \
sl@0
    59
        ) \
sl@0
    60
    /**/
sl@0
    61
sl@0
    62
#   define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
sl@0
    63
    BOOST_PP_COMMA_IF(n) \
sl@0
    64
    BOOST_MPL_PP_PARAMS(n, param) \
sl@0
    65
    /**/
sl@0
    66
sl@0
    67
#   if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
sl@0
    68
sl@0
    69
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
sl@0
    70
// forward declaration
sl@0
    71
template<
sl@0
    72
      typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
sl@0
    73
    >
sl@0
    74
struct apply;
sl@0
    75
#else
sl@0
    76
namespace aux {
sl@0
    77
template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
sl@0
    78
}
sl@0
    79
#endif
sl@0
    80
sl@0
    81
#   endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
sl@0
    82
sl@0
    83
#define BOOST_PP_ITERATION_PARAMS_1 \
sl@0
    84
    (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))
sl@0
    85
#include BOOST_PP_ITERATE()
sl@0
    86
sl@0
    87
sl@0
    88
#   undef AUX778076_APPLY_N_COMMA_PARAMS
sl@0
    89
#   undef AUX778076_APPLY_DEF_PARAMS
sl@0
    90
sl@0
    91
}}
sl@0
    92
sl@0
    93
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
sl@0
    94
#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED
sl@0
    95
sl@0
    96
///// iteration
sl@0
    97
sl@0
    98
#else
sl@0
    99
#define i_ BOOST_PP_FRAME_ITERATION(1)
sl@0
   100
sl@0
   101
template<
sl@0
   102
      typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
sl@0
   103
    >
sl@0
   104
struct BOOST_PP_CAT(apply,i_);
sl@0
   105
sl@0
   106
#undef i_
sl@0
   107
#endif // BOOST_PP_IS_ITERATING