~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/mpl/list/aux_/numbered_c.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
// boost mpl/list/aux_/numbered_c.hpp header file
 
3
// See http://www.boost.org for updates, documentation, and revision history.
 
4
//-----------------------------------------------------------------------------
 
5
//
 
6
// Copyright (c) 2000-02
 
7
// Aleksey Gurtovoy
 
8
//
 
9
// Permission to use, copy, modify, distribute and sell this software
 
10
// and its documentation for any purpose is hereby granted without fee, 
 
11
// provided that the above copyright notice appears in all copies and 
 
12
// that both the copyright notice and this permission notice appear in 
 
13
// supporting documentation. No representations are made about the 
 
14
// suitability of this software for any purpose. It is provided "as is" 
 
15
// without express or implied warranty.
 
16
 
 
17
// no include guards, the header is intended for multiple inclusion!
 
18
 
 
19
#if defined(BOOST_PP_IS_ITERATING)
 
20
 
 
21
#include "boost/preprocessor/enum_params.hpp"
 
22
#include "boost/preprocessor/enum_shifted_params.hpp"
 
23
#include "boost/preprocessor/dec.hpp"
 
24
#include "boost/preprocessor/cat.hpp"
 
25
 
 
26
#define i BOOST_PP_FRAME_ITERATION(1)
 
27
 
 
28
#if i == 1
 
29
 
 
30
template<
 
31
      typename T
 
32
    , BOOST_PP_ENUM_PARAMS(i, T C)
 
33
    >
 
34
struct list1_c
 
35
    : list_node<
 
36
          integral_c<long,1>
 
37
        , integral_c<T,C0>
 
38
        , null_node
 
39
        >
 
40
{
 
41
    typedef list1_c type;
 
42
};
 
43
 
 
44
#else
 
45
 
 
46
#   define MPL_AUX_LIST_C_TAIL(list, i, C) \
 
47
    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c)<T, \
 
48
      BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \
 
49
    > \
 
50
    /**/
 
51
    
 
52
template<
 
53
      typename T
 
54
    , BOOST_PP_ENUM_PARAMS(i, T C)
 
55
    >
 
56
struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
 
57
    : list_node<
 
58
          integral_c<long,i>
 
59
        , integral_c<T,C0>
 
60
        , MPL_AUX_LIST_C_TAIL(list,i,C)
 
61
        >
 
62
{
 
63
    typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
 
64
};
 
65
 
 
66
#   undef MPL_AUX_LIST_C_TAIL
 
67
 
 
68
#endif // i == 1
 
69
 
 
70
#undef i
 
71
 
 
72
#endif // BOOST_PP_IS_ITERATING