The BOOST_PP_SET_INSERT macro inserts an element into an set.

Usage

BOOST_PP_SET_INSERT(set, i, elem)

Arguments

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

Remarks

This macro inserts elem before the element at index i.

Requirements

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

Sample Code

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

#define SET (a)(b)(d)

BOOST_PP_SET_INSERT(SET, 2, c) // expands to (a)(b)(c)(d)