diff --git a/example/array_arithmetic.c b/example/array_arithmetic.c index fbd25f7..60559d4 100644 --- a/example/array_arithmetic.c +++ b/example/array_arithmetic.c @@ -20,9 +20,9 @@ * Compile with any C compiler with a standards conforming preprocessor. */ -#include #include #include +#include #include #include #include @@ -121,7 +121,7 @@ #define UNARY_ARRAY_OP(R,_,L) UNARY_ARRAY_OP2(BOOST_PP_LIST_AT(L,1),BOOST_PP_LIST_FIRST(L)) #define UNARY_ARRAY_OP2(O,T) BOOST_PP_IF(IS_VALID_UNARY_OP_AND_TYPE_COMBINATION(O,T),UNARY_ARRAY_OP3,BOOST_PP_TUPLE2_EAT)(O,T) #define UNARY_ARRAY_OP3(O,T)\ - void BOOST_PP_CAT4(array_,OP_NAME(O),_,TYPE_ABBREVIATION(T))\ + void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(4,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(T))))\ ( const TYPE_NAME(T)* in\ , TYPE_NAME(TYPE_OF_UNARY_OP(O,T))* out\ , unsigned n\ @@ -137,7 +137,7 @@ BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP,_,BOOST_PP_TUPLE_TO_LIST(2,(APPLIC #define BINARY_ARRAY_OP(R,_,L) BINARY_ARRAY_OP2(BOOST_PP_LIST_AT(L,2),BOOST_PP_LIST_AT(L,1),BOOST_PP_LIST_FIRST(L)) #define BINARY_ARRAY_OP2(O,L,R) BOOST_PP_IF(IS_VALID_BINARY_OP_AND_TYPE_COMBINATION(O,L,R),BINARY_ARRAY_OP3,BOOST_PP_TUPLE3_EAT)(O,L,R) #define BINARY_ARRAY_OP3(O,L,R)\ - void BOOST_PP_CAT6(array_,OP_NAME(O),_,TYPE_ABBREVIATION(L),_,TYPE_ABBREVIATION(R))\ + void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(6,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(L),_,TYPE_ABBREVIATION(R))))\ ( const TYPE_NAME(L)* lhs_in\ , const TYPE_NAME(R)* rhs_in\ , TYPE_NAME(TYPE_OF_BINARY_OP(O,L,R))* out\ diff --git a/example/array_arithmetic_helpers.hpp b/example/array_arithmetic_helpers.hpp deleted file mode 100644 index 30bf88e..0000000 --- a/example/array_arithmetic_helpers.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef BOOST_LIBS_PREPROCESSOR_EXAMPLE_ARRAY_ARITHMETIC_HELPERS_HPP -#define BOOST_LIBS_PREPROCESSOR_EXAMPLE_ARRAY_ARITHMETIC_HELPERS_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 - -#define BOOST_PP_CAT3(A,B,C) BOOST_PP_CAT(BOOST_PP_CAT(A,B),C) -#define BOOST_PP_CAT4(A,B,C,D) BOOST_PP_CAT3(BOOST_PP_CAT(A,B),C,D) -#define BOOST_PP_CAT5(A,B,C,D,E) BOOST_PP_CAT4(BOOST_PP_CAT(A,B),C,D,E) -#define BOOST_PP_CAT6(A,B,C,D,E,F) BOOST_PP_CAT5(BOOST_PP_CAT(A,B),C,D,E,F) -#endif