BOOST_PP_COUNTER

The BOOST_PP_COUNTER macro expands to the current counter value.

#### Usage

BOOST_PP_COUNTER

#### Remarks

This macro expands to an integer literal. Its initial value is `0`. Between usages of BOOST_PP_UPDATE_COUNTER, the value of BOOST_PP_COUNTER is constant.

#### See Also

- BOOST_PP_UPDATE_COUNTER

#### Requirements

Header: <boost/preprocessor/slot/counter.hpp>

#### Sample Code

    #include <boost/preprocessor/slot/counter.hpp>

    BOOST_PP_COUNTER // 0

    #include BOOST_PP_UPDATE_COUNTER()

    BOOST_PP_COUNTER // 1

    #include BOOST_PP_UPDATE_COUNTER()

    BOOST_PP_COUNTER // 2

    #include BOOST_PP_UPDATE_COUNTER()

    BOOST_PP_COUNTER // 3

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