diff --git a/doc/keywords.txt b/doc/keywords.txt
index 8e5825d..211cd4b 100644
--- a/doc/keywords.txt
+++ b/doc/keywords.txt
@@ -19,6 +19,7 @@ BOOST_PP_ENUM_SHIFTED_PARAMS
BOOST_PP_EQUAL
BOOST_PP_EQUAL_D
BOOST_PP_EXPAND
+BOOST_PP_EXPR_IF
BOOST_PP_FOR
BOOST_PP_GREATER
BOOST_PP_GREATER_D
@@ -26,7 +27,6 @@ BOOST_PP_GREATER_EQUAL
BOOST_PP_GREATER_EQUAL_D
BOOST_PP_IDENTITY
BOOST_PP_IF
-BOOST_PP_IF_THEN
BOOST_PP_INC
BOOST_PP_LESS
BOOST_PP_LESS_D
diff --git a/doc/reference/expand.htm b/doc/reference/expand.htm
index ce7fd8f..3be5eaf 100644
--- a/doc/reference/expand.htm
+++ b/doc/reference/expand.htm
@@ -19,7 +19,7 @@
-Prev Next Macros Headers
+Prev Next Macros Headers
@@ -30,7 +30,7 @@
Essentially macro expands the parameter X
twice.
-Prev Next Macros Headers
+Prev Next Macros Headers
Revised
diff --git a/doc/reference/if_then.htm b/doc/reference/expr_if.htm
similarity index 62%
rename from doc/reference/if_then.htm
rename to doc/reference/expr_if.htm
index 7b1d6f7..b87c9b4 100644
--- a/doc/reference/if_then.htm
+++ b/doc/reference/expr_if.htm
@@ -19,21 +19,26 @@
-Prev Next Macros Headers
+Prev Next Macros Headers
-
+
-
- Expands to T
if C != 0
and to nothing if C == 0
.
+
+ Expands to E
if C != 0
and to nothing if C == 0
.
-For example, BOOST_PP_IF_THEN(1,^)
expands to ^
.
+For example, BOOST_PP_EXPR_IF(1,^)
expands to ^
.
+
+See
+
-Prev Next Macros Headers
+Prev Next Macros Headers
Revised
diff --git a/doc/reference/for.htm b/doc/reference/for.htm
index c585080..cc5da2a 100644
--- a/doc/reference/for.htm
+++ b/doc/reference/for.htm
@@ -19,7 +19,7 @@
-Prev Next Macros Headers
+Prev Next Macros Headers
@@ -89,7 +89,7 @@ invoking BOOST_PP_FOR##R() directly.
-Prev Next Macros Headers
+Prev Next Macros Headers
Revised
diff --git a/doc/reference/if.htm b/doc/reference/if.htm
index dd0e053..51fda0d 100644
--- a/doc/reference/if.htm
+++ b/doc/reference/if.htm
@@ -19,7 +19,7 @@
-Prev Next Macros Headers
+Prev Next Macros Headers
@@ -32,6 +32,11 @@
For example, BOOST_PP_IF(0,1,2)
expands to 2
.
+See
+
+
Test
- preprocessor_test.cpp
@@ -43,7 +48,7 @@
Obsolete. Use BOOST_PP_IF().
-Prev Next Macros Headers
+Prev Next Macros Headers
Revised
diff --git a/doc/reference/inc.htm b/doc/reference/inc.htm
index 265795c..fd764e3 100644
--- a/doc/reference/inc.htm
+++ b/doc/reference/inc.htm
@@ -19,7 +19,7 @@
-Prev Next Macros Headers
+Prev Next Macros Headers
@@ -44,7 +44,7 @@ supported.
Obsolete. Use BOOST_PP_INC().
-Prev Next Macros Headers
+Prev Next Macros Headers
Revised
diff --git a/doc/reference/index.htm b/doc/reference/index.htm
index 2dde07f..2980348 100644
--- a/doc/reference/index.htm
+++ b/doc/reference/index.htm
@@ -42,6 +42,7 @@
- BOOST_PP_EQUAL
- BOOST_PP_EQUAL_D
- BOOST_PP_EXPAND
+ - BOOST_PP_EXPR_IF
- BOOST_PP_FOR
- BOOST_PP_GREATER
- BOOST_PP_GREATER_D
@@ -49,7 +50,6 @@
- BOOST_PP_GREATER_EQUAL_D
- BOOST_PP_IDENTITY
- BOOST_PP_IF
- - BOOST_PP_IF_THEN
- BOOST_PP_INC
- BOOST_PP_LESS
- BOOST_PP_LESS_D
@@ -197,10 +197,10 @@
- #include <boost/preprocessor/enum_shifted.hpp>
- #include <boost/preprocessor/enum_shifted_params.hpp>
- #include <boost/preprocessor/expand.hpp>
+ - #include <boost/preprocessor/expr_if.hpp>
- #include <boost/preprocessor/for.hpp>
- #include <boost/preprocessor/identity.hpp>
- #include <boost/preprocessor/if.hpp>
- - #include <boost/preprocessor/if_then.hpp>
- #include <boost/preprocessor/inc.hpp>
- #include <boost/preprocessor/limits.hpp>
- #include <boost/preprocessor/list.hpp>
diff --git a/include/boost/preprocessor/assert_msg.hpp b/include/boost/preprocessor/assert_msg.hpp
index 37ecff7..5838683 100644
--- a/include/boost/preprocessor/assert_msg.hpp
+++ b/include/boost/preprocessor/assert_msg.hpp
@@ -13,7 +13,7 @@
* See http://www.boost.org for most recent version.
*/
-#include
+#include
#include
/** Expands to nothing if C != 0
and to MSG
if
@@ -21,7 +21,7 @@
For example, BOOST_PP_ASSERT_MSG(1,A BUG!)
expands to A BUG!
.
*/
-#define BOOST_PP_ASSERT_MSG(C,MSG) BOOST_PP_IF_THEN(BOOST_PP_NOT(C),MSG)
+#define BOOST_PP_ASSERT_MSG(C,MSG) BOOST_PP_EXPR_IF(BOOST_PP_NOT(C),MSG)
/** Obsolete. Use BOOST_PP_ASSERT_MSG().
*/
#define BOOST_PREPROCESSOR_ASSERT_MSG(C,MSG) BOOST_PP_ASSERT_MSG(C,MSG)
diff --git a/include/boost/preprocessor/expr_if.hpp b/include/boost/preprocessor/expr_if.hpp
new file mode 100644
index 0000000..eb99a10
--- /dev/null
+++ b/include/boost/preprocessor/expr_if.hpp
@@ -0,0 +1,33 @@
+#ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP
+#define BOOST_PREPROCESSOR_EXPR_IF_HPP
+
+/* Copyright (C) 2002
+ * Housemarque Oy
+ * http://www.housemarque.com
+ *
+ * Permission to copy, use, modify, sell and distribute this software is
+ * granted provided this copyright notice appears in all copies. This
+ * software is provided "as is" without express or implied warranty, and
+ * with no claim as to its suitability for any purpose.
+ *
+ * See http://www.boost.org for most recent version.
+ */
+
+#include
+
+/** Expands to E
if C != 0
and to nothing if C == 0
.
+
+For example, BOOST_PP_EXPR_IF(1,^)
expands to ^
.
+
+See
+
+*/
+#define BOOST_PP_EXPR_IF(C,E) BOOST_PP_EXPR_IF_BOOL(BOOST_PP_BOOL(C),E)
+
+#define BOOST_PP_EXPR_IF_BOOL(C,E) BOOST_PP_EXPR_IF_BOOL_DELAY(C,E)
+#define BOOST_PP_EXPR_IF_BOOL_DELAY(C,E) BOOST_PP_EXPR_IF_BOOL##C(E)
+#define BOOST_PP_EXPR_IF_BOOL0(E)
+#define BOOST_PP_EXPR_IF_BOOL1(E) E
+#endif
diff --git a/include/boost/preprocessor/if.hpp b/include/boost/preprocessor/if.hpp
index 1bce470..158cbf3 100644
--- a/include/boost/preprocessor/if.hpp
+++ b/include/boost/preprocessor/if.hpp
@@ -21,6 +21,11 @@
For example, BOOST_PP_IF(0,1,2)
expands to 2
.
+See
+
+
Test
- preprocessor_test.cpp
diff --git a/include/boost/preprocessor/if_then.hpp b/include/boost/preprocessor/if_then.hpp
deleted file mode 100644
index a850d81..0000000
--- a/include/boost/preprocessor/if_then.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef BOOST_PREPROCESSOR_IF_THEN_HPP
-#define BOOST_PREPROCESSOR_IF_THEN_HPP
-
-/* Copyright (C) 2002
- * Housemarque Oy
- * http://www.housemarque.com
- *
- * Permission to copy, use, modify, sell and distribute this software is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-#include
-
-/** Expands to T
if C != 0
and to nothing if C == 0
.
-
-For example, BOOST_PP_IF_THEN(1,^)
expands to ^
.
-*/
-#define BOOST_PP_IF_THEN(C,T) BOOST_PP_IF_THEN_BOOL(BOOST_PP_BOOL(C),T)
-
-#define BOOST_PP_IF_THEN_BOOL(C,T) BOOST_PP_IF_THEN_BOOL_DELAY(C,T)
-#define BOOST_PP_IF_THEN_BOOL_DELAY(C,T) BOOST_PP_IF_THEN_BOOL##C(T)
-#define BOOST_PP_IF_THEN_BOOL0(T)
-#define BOOST_PP_IF_THEN_BOOL1(T) T
-#endif
diff --git a/test/preprocessor_test.cpp b/test/preprocessor_test.cpp
index fe9a0c9..a28690d 100644
--- a/test/preprocessor_test.cpp
+++ b/test/preprocessor_test.cpp
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include
#include
@@ -40,6 +41,10 @@ TEST_B BOOST_PP_IF(BOOST_PP_IF(1,1,1),true,false) &&
/* *** */
+TEST_B BOOST_PP_EXPR_IF(1,1) TEST_E
+
+/* *** */
+
#if !(!defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__))
TEST_B BOOST_PP_CAT(BOOST_PP_IF(1,tru,fals), MACRO MACRO_ARGS(e)) TEST_E
#endif