]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/repeat_from_to_3rd.hpp
Jrgen's "Tooltips for the reference dialog" patch. I've tried to incorporate
[lyx.git] / boost / boost / preprocessor / repeat_from_to_3rd.hpp
1 #ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP
2 #define BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP
3
4 /* Copyright (C) 2002
5  * Housemarque Oy
6  * http://www.housemarque.com
7  *
8  * Permission to copy, use, modify, sell and distribute this software is
9  * granted provided this copyright notice appears in all copies. This
10  * software is provided "as is" without express or implied warranty, and
11  * with no claim as to its suitability for any purpose.
12  *
13  * See http://www.boost.org for most recent version.
14  */
15
16 #include <boost/preprocessor/repeat_3rd.hpp>
17 #include <boost/preprocessor/arithmetic/sub.hpp>
18 #include <boost/preprocessor/arithmetic/add.hpp>
19
20 /** <p>Same as BOOST_PP_REPEAT_FROM_TO(), but implemented independently.</p> */
21 #define BOOST_PP_REPEAT_FROM_TO_3RD(FIRST,LAST,MACRO,DATA) BOOST_PP_REPEAT_3RD(BOOST_PP_SUB(LAST,FIRST),BOOST_PP_REPEAT_FROM_TO_3RD_F,(FIRST,MACRO,DATA))
22 #define BOOST_PP_REPEAT_FROM_TO_3RD_F(I,SMP) BOOST_PP_TUPLE_ELEM(3,1,SMP)(BOOST_PP_ADD(I,BOOST_PP_TUPLE_ELEM(3,0,SMP)),BOOST_PP_TUPLE_ELEM(3,2,SMP))
23 #endif