~ubuntu-branches/ubuntu/breezy/aqsis/breezy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Will Newton
  • Date: 2004-12-07 20:06:49 UTC
  • Revision ID: james.westby@ubuntu.com-20041207200649-fccswkrvp4oc8lmn
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
// boost mpl/list/aux_/numbered.hpp header file
 
3
// See http://www.boost.org for updates, documentation, and revision history.
 
4
//-----------------------------------------------------------------------------
 
5
//
 
6
// Copyright (c) 2000-02
 
7
// Peter Dimov, 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
      BOOST_PP_ENUM_PARAMS(i, typename T)
 
32
    >
 
33
struct list1
 
34
    : list_node<
 
35
          integral_c<long,1>
 
36
        , T0
 
37
        , null_node
 
38
        >
 
39
{
 
40
    typedef list1 type;
 
41
};
 
42
 
 
43
#else
 
44
 
 
45
#   define MPL_AUX_LIST_TAIL(list, i, T) \
 
46
    BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \
 
47
      BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \
 
48
    > \
 
49
    /**/
 
50
    
 
51
template<
 
52
      BOOST_PP_ENUM_PARAMS(i, typename T)
 
53
    >
 
54
struct BOOST_PP_CAT(list,i)
 
55
    : list_node<
 
56
          integral_c<long,i>
 
57
        , T0
 
58
        , MPL_AUX_LIST_TAIL(list,i,T)
 
59
        >
 
60
{
 
61
    typedef BOOST_PP_CAT(list,i) type;
 
62
};
 
63
 
 
64
#   undef MPL_AUX_LIST_TAIL
 
65
 
 
66
#endif // i == 1
 
67
 
 
68
#undef i
 
69
 
 
70
#endif // BOOST_PP_IS_ITERATING