diff --git a/doc/keywords.txt b/doc/keywords.txt index 5dbb179..8e5825d 100644 --- a/doc/keywords.txt +++ b/doc/keywords.txt @@ -26,6 +26,7 @@ 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/if.htm b/doc/reference/if.htm index 4949d04..6e39848 100644 --- a/doc/reference/if.htm +++ b/doc/reference/if.htm @@ -19,7 +19,7 @@
-Prev Next Macros Headers +Prev Next Macros Headers

#include <boost/preprocessor/if.hpp>

@@ -44,7 +44,7 @@

Obsolete. Use BOOST_PP_IF().


-Prev Next Macros Headers +Prev Next Macros Headers

Revised

diff --git a/doc/reference/if_then.htm b/doc/reference/if_then.htm new file mode 100644 index 0000000..50251d0 --- /dev/null +++ b/doc/reference/if_then.htm @@ -0,0 +1,46 @@ + + + +Boost.Preprocessor - Reference + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/if_then.hpp>

+ +
+ +

#define BOOST_PP_IF_THEN(C,T)

+

Expands to T if C != 0 and to nothing if C == 0.

+ +
+ +Prev Next Macros Headers +
+ +

Revised

+ +

© Copyright Housemarque Oy 2002

+ +

Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.

+ + diff --git a/doc/reference/inc.htm b/doc/reference/inc.htm index fd764e3..265795c 100644 --- a/doc/reference/inc.htm +++ b/doc/reference/inc.htm @@ -19,7 +19,7 @@
-Prev Next Macros Headers +Prev Next Macros Headers

#include <boost/preprocessor/inc.hpp>

@@ -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 2454a0a..2dde07f 100644 --- a/doc/reference/index.htm +++ b/doc/reference/index.htm @@ -49,6 +49,7 @@
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
@@ -199,6 +200,7 @@
#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 fa70ae3..ff384d0 100644 --- a/include/boost/preprocessor/assert_msg.hpp +++ b/include/boost/preprocessor/assert_msg.hpp @@ -13,12 +13,12 @@ * See http://www.boost.org for most recent version. */ -#include -#include +#include +#include /**

Expands to nothing if C != 0 and to MSG if C == 0.

*/ -#define BOOST_PP_ASSERT_MSG(C,MSG) BOOST_PP_IF(C,BOOST_PP_EMPTY,MSG BOOST_PP_EMPTY)() +#define BOOST_PP_ASSERT_MSG(C,MSG) BOOST_PP_IF_THEN(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/if_then.hpp b/include/boost/preprocessor/if_then.hpp new file mode 100644 index 0000000..725f242 --- /dev/null +++ b/include/boost/preprocessor/if_then.hpp @@ -0,0 +1,22 @@ +#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 +#include + +/**

Expands to T if C != 0 and to nothing if C == 0.

+*/ +#define BOOST_PP_IF_THEN(C,T) BOOST_PP_IF(C,T BOOST_PP_EMPTY,BOOST_PP_EMPTY)() +#endif