The BOOST_PP_LIMIT_REPEAT macro defines the maximum number of repetitions supported by each BOOST_PP_REPEAT dimension.

Usage

BOOST_PP_LIMIT_REPEAT

Remarks

This macro expands by default to 256. For a C++ standard conforming preprocessor, the end-user can change this to 512 or 1024 by defining this macro to either value before including any library headers, as long as the end-user also defines the BOOST_PP_LIMIT_MAG macro to be equal to or greater than this value.

NOTE: for the current latest versions of default preprocessor for Microsoft's VC++ compiler there is a nested macro limit of 256. This means in actuality that the number of repetitions using VC++ is actually less than 256 depending on the repetition macro being used. For the BOOST_PP_REPEAT macro this limit appears to be 252 while for the BOOST_PP_ENUM... series of macros this limit appears to be around 230, before the VC++ compiler gives a "C1009: compiler limit : macros nested too deeply" error. This is a compiler limitation of VC++ which may vary depending on the specific repetition macro being used, and therefore is not a problem the preprocessor library can solve. This limitation of the default preprocessor for VC++ does not exist for the new standard conforming preprocessor for VC++ in Visual Studio 2019 invoked with the /Zc:preprocessor switch.

Requirements

Header:  <boost/preprocessor/config/limits.hpp>
See also


Copyright Housemarque Oy 2002
Copyright Paul Mensonides 2002

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)