]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/list/cat.hpp
Jrgen's "Tooltips for the reference dialog" patch. I've tried to incorporate
[lyx.git] / boost / boost / preprocessor / list / cat.hpp
1 #ifndef BOOST_PREPROCESSOR_LIST_CAT_HPP
2 #define BOOST_PREPROCESSOR_LIST_CAT_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/cat.hpp>
17 #include <boost/preprocessor/list/fold_left.hpp>
18
19 /** <p>Catenates all elements of the list.</p>
20
21 <p>For example,</p>
22
23 <pre>
24 BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(3,(1,2,3)))
25 </pre>
26
27 <p>expands to:</p>
28
29 <pre>
30 123
31 </pre>
32
33 <h3>Uses</h3>
34 <ul>
35   <li>BOOST_PP_LIST_FOLD_LEFT()</li>
36 </ul>
37
38 <h3>Test</h3>
39 <ul>
40   <li><a href="../../test/list_test.cpp">list_test.cpp</a></li>
41 </ul>
42 */
43 #define BOOST_PP_LIST_CAT(LIST) BOOST_PP_LIST_CAT_D(0,LIST)
44
45 /** <p>Can be used inside BOOST_PP_WHILE().</p> */
46 #define BOOST_PP_LIST_CAT_D(D,LIST) BOOST_PP_LIST_FOLD_LEFT_D(D,BOOST_PP_LIST_CAT_F,BOOST_PP_TUPLE3_ELEM0 LIST,BOOST_PP_TUPLE3_ELEM1 LIST)
47 #define BOOST_PP_LIST_CAT_F(D,P,H) BOOST_PP_CAT(P,H)
48 #endif