BOOST_PP_LOCAL_MACRO

The BOOST_PP_LOCAL_MACRO macro is a user-defined named external argument used by BOOST_PP_LOCAL_ITERATE.

#### Usage

#define BOOST_PP_LOCAL_MACRO(n) ...

#### Arguments

n
  The current iteration value received from the local-iteration mechanism.

#### Remarks

This macro is automatically undefined for reuse by a call to BOOST_PP_LOCAL_ITERATE.

#### See Also

- BOOST_PP_LOCAL_ITERATE

#### Sample Code

    #include <boost/preprocessor/iteration/local.hpp>

    template<int> struct sample;

    #define BOOST_PP_LOCAL_MACRO(n) \
       template<> struct sample<n> { \
          enum { value = n }; \
       }; \
       /**/

    #define BOOST_PP_LOCAL_LIMITS (1, 5)

    #include BOOST_PP_LOCAL_ITERATE()
    /* expands to...
    template<> struct sample<1> { enum { value = 1 }; };
    template<> struct sample<2> { enum { value = 2 }; };
    template<> struct sample<3> { enum { value = 3 }; };
    template<> struct sample<4> { enum { value = 4 }; };
    template<> struct sample<5> { enum { value = 5 }; };
    */

© 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)