c++boost.gif (8819 bytes)

#include <boost/preprocessor/while.hpp>


#define BOOST_PP_WHILE(C,F,X)

Iterates F(D,X) while C(D,X) is true.

In other words, expands to:

  F(D, ... F(D, F(D,X) ) ... )

The depth of iteration is determined by C(D,X).

Legend

Note

Using BOOST_PP_WHILE() is a bit tricky. This is due to the C++ preprocessor limitations. It is recommended to take a look at the implementations of the various PREPROCESSOR library primitives such as BOOST_PP_ADD() for additional examples.

Example

Implementation rationale


(C) 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.

Generated: