BOOST_PP_LIST_SIZE

The BOOST_PP_LIST_SIZE macro expands to the size of a list.

#### Usage

BOOST_PP_LIST_SIZE(list)

#### Arguments

list
  A list whose size is to be calculated.

#### Remarks

Previously, this macro could not be used inside BOOST_PP_WHILE. There is no longer any such restriction. It is more efficient, however, to use BOOST_PP_LIST_SIZE_D in such a situation.

#### See Also

- BOOST_PP_LIST_SIZE_D

#### Requirements

Header: <boost/preprocessor/list/size.hpp>

#### Sample Code

    #include <boost/preprocessor/list/size.hpp>

    #define LIST (0, (1, (2, (3, BOOST_PP_NIL))))

    BOOST_PP_LIST_SIZE(LIST) // expands to 4

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