1 #ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP
2 #define BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP
6 * http://www.housemarque.com
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.
13 * See http://www.boost.org for most recent version.
16 #include <boost/preprocessor/repeat_3rd.hpp>
17 #include <boost/preprocessor/arithmetic/sub.hpp>
18 #include <boost/preprocessor/arithmetic/add.hpp>
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))