]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/iterate.hpp
update boost
[lyx.git] / boost / boost / preprocessor / iterate.hpp
1 # ifndef BOOST_PREPROCESSOR_ITERATE_HPP
2 # define BOOST_PREPROCESSOR_ITERATE_HPP
3 #
4 # /* **************************************************************************
5 #  *                                                                          *
6 #  *     (C) Copyright Paul Mensonides 2002.  Permission to copy, use,        *
7 #  *     modify, sell, and distribute this software is granted provided       *
8 #  *     this copyright notice appears in all copies.  This software is       *
9 #  *     provided "as is" without express or implied warranty, and with       *
10 #  *     no claim at to its suitability for any purpose.                      *
11 #  *                                                                          *
12 #  ************************************************************************** */
13 #
14 # include <boost/preprocessor/array.hpp>
15 # include <boost/preprocessor/dec.hpp>
16 # include <boost/preprocessor/inc.hpp>
17 # include <boost/preprocessor/stringize.hpp>
18 #
19 # include <boost/preprocessor/tuple/elem.hpp>
20 #
21 # include <boost/preprocessor/detail/cat.hpp>
22 # include <boost/preprocessor/detail/line.hpp>
23 #
24 # define BOOST_PP_ITERATION_DEPTH_LIMIT 5
25 # define BOOST_PP_ITERATION_LIMIT 256
26 #
27 # define BOOST_PP_ITERATION_DEPTH() 0
28 #
29 # define BOOST_PP_ITERATION() BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH())
30 #
31 # define BOOST_PP_ITERATION_START() BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH())
32 # define BOOST_PP_ITERATION_FINISH() BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH())
33 #
34 # define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_, i)
35 # define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_)
36 #
37 # define BOOST_PP_FRAME_START(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_START_, i)
38 # define BOOST_PP_RELATIVE_START(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_)
39 #
40 # define BOOST_PP_FRAME_FINISH(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_FINISH_, i)
41 # define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_)
42 #
43 # define BOOST_PP_ITERATION_FLAGS() BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())
44 # define BOOST_PP_FRAME_FLAGS(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATION_FLAGS_, i)
45 # define BOOST_PP_RELATIVE_FLAGS(i) BOOST_PP_DETAIL_CAT2(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)
46 #
47 # define BOOST_PP_RELATIVE_0(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_ITERATION_DEPTH())
48 # define BOOST_PP_RELATIVE_1(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))
49 # define BOOST_PP_RELATIVE_2(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))
50 # define BOOST_PP_RELATIVE_3(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))
51 # define BOOST_PP_RELATIVE_4(m) BOOST_PP_DETAIL_CAT2(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))))
52 #
53 # if defined BOOST_PP_EXTENDED_LINE_INFO && (!defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002)
54 #   define BOOST_PP_LINE(line, file) line BOOST_PP_STRINGIZE(file BOOST_PP_DETAIL_CAT2(BOOST_PP_LINE_, BOOST_PP_ITERATION_DEPTH()))
55 # else
56 #   define BOOST_PP_LINE(line, file) __LINE__
57 # endif
58 #
59 # define BOOST_PP_LINE_0() (!BOOST_PP_ERROR_NO_ACTIVE_ITERATION)
60 # define BOOST_PP_LINE_1() BOOST_PP_DETAIL_CAT3([, BOOST_PP_ITERATION(), ])
61 # define BOOST_PP_LINE_2() BOOST_PP_DETAIL_CAT2(BOOST_PP_DETAIL_CAT3([, BOOST_PP_FRAME_ITERATION(1), ]), BOOST_PP_LINE_1())
62 # define BOOST_PP_LINE_3() BOOST_PP_DETAIL_CAT2(BOOST_PP_DETAIL_CAT3([, BOOST_PP_FRAME_ITERATION(2), ]), BOOST_PP_LINE_2())
63 # define BOOST_PP_LINE_4() BOOST_PP_DETAIL_CAT2(BOOST_PP_DETAIL_CAT3([, BOOST_PP_FRAME_ITERATION(3), ]), BOOST_PP_LINE_3())
64 # define BOOST_PP_LINE_5() BOOST_PP_DETAIL_CAT2(BOOST_PP_DETAIL_CAT3([, BOOST_PP_FRAME_ITERATION(4), ]), BOOST_PP_LINE_4())
65 #
66 # define BOOST_PP_ITERATE() BOOST_PP_DETAIL_CAT2(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH()))
67 # define BOOST_PP_ITERATE_1 <boost/preprocessor/detail/iterate/exp1.hpp>
68 # define BOOST_PP_ITERATE_2 <boost/preprocessor/detail/iterate/exp2.hpp>
69 # define BOOST_PP_ITERATE_3 <boost/preprocessor/detail/iterate/exp3.hpp>
70 # define BOOST_PP_ITERATE_4 <boost/preprocessor/detail/iterate/exp4.hpp>
71 # define BOOST_PP_ITERATE_5 <boost/preprocessor/detail/iterate/exp5.hpp>
72 #
73 # define BOOST_PP_LOCAL_ITERATE() <boost/preprocessor/detail/iterate/local_iterate.hpp>
74 #
75 # define BOOST_PP_INCLUDE_SELF() <boost/preprocessor/detail/iterate/self.hpp>
76 #
77 # endif