###  | # Boost.Preprocessor ## Examples

array_arithmetic.c | This example implements over 2200 functions for 1-dimensional arithmetic array manipulation in C. The idea is to use preprocessor data structures, lists and tuples, for storing metainformation to be used for generating the actual C code.
catch_builtin.cpp | This example demonstrates the usage of lists and BOOST_PP_LIST_FOR_EACH().
count_down.c | This is a trivial example of using BOOST_PP_WHILE() that simply counts down from N to 0 ultimately expanding to a 0.
delay.c | This example implements a macro whose expansion takes exponential amount of time.
duffs_device.c | This example uses the preprocessor library to implement a generalized macro for implementing a Duff's Device.
is_integral.cpp | This example demonstrates the usage of preprocessor lists for generating C++ code.
linear_fib.c | This example shows how BOOST_PP_WHILE() can be used for implementing macros.
note.c | This example shows how BOOST_PP_STRINGIZE() can be used to allow macro expansion before stringization.
repeat_2d.c | This example implements a generalized macro for 2D repetition using the simple repetition primitives of the preprocessor library.
static_assert.c | This example shows how BOOST_PP_CAT() can be used to allow macro expansion before token concatenation.
subscript_layer.cpp | This example shows how BOOST_PP_EMPTY can be used as an unused or empty parameter.

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.