The BOOST_PP_SEQ_FIRST_N macro expands to a seq of the first n elements of a seq.

Usage

BOOST_PP_SEQ_FIRST_N(n, seq)

Arguments

n
The number of elements to extract.
seq
The seq from which the elements are extracted.

Remarks

This macro extracts n elements from the beginning of seq and returns them as a new seq

See Also

Requirements

Header:  <boost/preprocessor/seq/first_n.hpp>

Sample Code

#include <boost/preprocessor/seq/first_n.hpp>

#define SEQ (a)(b)(c)(d)(e)

BOOST_PP_SEQ_FIRST_N(2, SEQ) // expands to (a)(b)

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)