The BOOST_PP_SEQ_INSERT macro inserts an element into an seq.

Usage

BOOST_PP_SEQ_INSERT(seq, i, elem)

Arguments

seq
The seq into which an element is to be inserted.
i
The zero-based position in seq where an element is to be inserted.  Valid values range from 0 to BOOST_PP_SEQ_SIZE(seq) - 1.
elem
The element to insert.

Remarks

This macro inserts elem before the element at index i.

Requirements

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

Sample Code

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

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

BOOST_PP_SEQ_INSERT(SEQ, 2, c) // expands to (a)(b)(c)(d)

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