]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/expr_if.hpp
update
[lyx.git] / boost / boost / preprocessor / expr_if.hpp
1 #ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP
2 #define BOOST_PREPROCESSOR_EXPR_IF_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/detail/cat.hpp>
17 #include <boost/preprocessor/logical/bool.hpp>
18
19 /** <p>Expands to <code>EXPR</code> if <code>COND != 0</code> and to nothing if <code>COND == 0</code>.</p>
20
21 <p><code>COND</code> must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].</p>
22
23 <p>For example, <code>BOOST_PP_EXPR_IF(1,^)</code> expands to <code>^</code>.</p>
24
25 <h3>See</h3>
26 <ul>
27   <li>BOOST_PP_IF()</li>
28 </ul>
29 */
30 #define BOOST_PP_EXPR_IF(COND,EXPR) BOOST_PP_DETAIL_CAT2(BOOST_PP_EXPR_IF,BOOST_PP_BOOL(COND))(EXPR)
31
32 #define BOOST_PP_EXPR_IF0(E)
33 #define BOOST_PP_EXPR_IF1(E) E
34 #endif