The BOOST_PP_SEQ_NIL macro is a placeholder macro for an empty seq. It is only valid if it is elements are appended to the end of this empty "seq."

#### Usage

BOOST_PP_SEQ_NIL

#### Remarks

This macro is a utility macro intended as a empty starting point for appending to the tail. It is not a nil seq. When an element is appended to this macro, it expands on the element and to the element--thereby removing itself. For example, both BOOST_PP_SEQ_NIL(x) and BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_SEQ_NIL, x) expand to x.
If any BOOST_PP_SEQ_* macro (other than BOOST_PP_SEQ_PUSH_BACK) is invoked with an argument that contains BOOST_PP_SEQ_NIL, the behavior is undefined and in most cases will result in obscure errors.
The closest thing available to BOOST_PP_SEQ_NIL for appending to the head is BOOST_PP_EMPTY. After all the elements have been prepended, empty parenthesis can be invoked on the tail to remove the BOOST_PP_EMPTY. As with BOOST_PP_SEQ_NIL, passing an argument that contains BOOST_PP_EMPTY to any BOOST_PP_SEQ_* macro (other than BOOST_PP_SEQ_PUSH_FRONT) is undefined.
(It is also possible to start with an extra element and pop it off when you have finished appending to it.)
In C99, neither of these macros are necessary since it is legal to pass empty arguments.

#### See Also

- BOOST_PP_EMPTY

#### Requirements

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

#### Sample Code

    #include <boost/preprocessor/facilities/empty.hpp>
    #include <boost/preprocessor/seq/push_back.hpp>
    #include <boost/preprocessor/seq/push_front.hpp>
    #include <boost/preprocessor/seq/seq.hpp>

    #define SEQ_L BOOST_PP_SEQ_NIL
    #define SEQ_R BOOST_PP_EMPTY

    BOOST_PP_SEQ_PUSH_BACK(
       BOOST_PP_SEQ_PUSH_BACK(SEQ_L, a), b
    )

    // expands to (a)(b)

    BOOST_PP_SEQ_PUSH_FRONT(
       BOOST_PP_SEQ_PUSH_FRONT(SEQ_R, a), b
    )()

    // expands to (b)(a)

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