# Boost.Preprocessor - Reference

###

# Boost.Preprocessor

## Reference

Prev Next Macros Headers

# #include <boost/preprocessor/enum_params_with_defaults.hpp>

## #define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(COUNT,PARAM,DEFAULT)

Generates a comma separated list of parameters with defaults.

In other words, expands to the sequence:

      BOOST_PP_CAT(PARAM,0) = BOOST_PP_CAT(DEFAULT,0),
      BOOST_PP_CAT(PARAM,1) = BOOST_PP_CAT(DEFAULT,1),
      ...,
      BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT)) = BOOST_PP_CAT(DEFAULT,BOOST_PP_DEC(COUNT))

For example,

      BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(3,x,y)

expands to:

      x0 = y0, x1 = y1, x2 = y2

### Uses

- BOOST_PP_REPEAT()

### Test

- repeat_test.cpp

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.