C++ Boost

Boost.Preprocessor

Header <boost/preprocessor/list/first_n.hpp>


Prev Next Macros Headers

#define BOOST_PP_LIST_FIRST_N(COUNT,LIST)

Expands to a list of the first COUNT elements of the list LIST.

For example,

BOOST_PP_LIST_FIRST_N(2,BOOST_PP_TUPLE_TO_LIST(4,(+,-,*,/)))

expands to the same as:

BOOST_PP_TUPLE_TO_LIST(2,(+,-))

See

Test


#define BOOST_PP_LIST_FIRST_N_D(D,COUNT,LIST)

Can be used inside BOOST_PP_WHILE() (see for an explanation the D parameter).


Prev Next Macros Headers

Revised

© Copyright Housemarque Oy 2002

Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.