]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/list/enum.hpp
Jrgen's "Tooltips for the reference dialog" patch. I've tried to incorporate
[lyx.git] / boost / boost / preprocessor / list / enum.hpp
1 #ifndef BOOST_PREPROCESSOR_LIST_ENUM_HPP
2 #define BOOST_PREPROCESSOR_LIST_ENUM_HPP
3
4 /* Copyright (C) 2001
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/comma_if.hpp>
17 #include <boost/preprocessor/list/for_each_i.hpp>
18
19 /** <p>Converts the list to a comma separated list.</p>
20
21 <p>For example,</p>
22
23 <pre>
24 BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)))
25 </pre>
26
27 <p>expands to:</p>
28
29 <pre>
30 A,B,C
31 </pre>
32
33 <h3>Uses</h3>
34 <ul>
35   <li>BOOST_PP_LIST_FOR_EACH_I()</li>
36 </ul>
37 */
38 #define BOOST_PP_LIST_ENUM(LIST) BOOST_PP_LIST_ENUM_R(0,LIST)
39
40 /** <p>Can be used inside BOOST_PP_FOR().</p> */
41 #define BOOST_PP_LIST_ENUM_R(R,LIST) BOOST_PP_LIST_FOR_EACH_I_R(R,BOOST_PP_LIST_ENUM_F,_,LIST)
42 #define BOOST_PP_LIST_ENUM_F(R,_,I,X) BOOST_PP_COMMA_IF(I) X
43 #endif