BOOST_PP_LIST_AT

The BOOST_PP_LIST_AT macro extracts an element in a list.

#### Usage

BOOST_PP_LIST_AT(list, index)

#### Arguments

list
  The list from which a element is to be extracted. This list must have at least index + 1 elements.
index
  The zero-based position in the list of the element to be extracted.

#### 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_AT_D in such a situation.

#### See Also

- BOOST_PP_LIST_AT_D

#### Requirements

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

#### Sample Code

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

    #define LIST (a, (b, (c, BOOST_PP_NIL)))

    BOOST_PP_LIST_AT(LIST, 0) // expands to a
    BOOST_PP_LIST_AT(LIST, 2) // expands to c

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