The BOOST_PP_LIST_IS_NIL macro is a predicate that determines if a list is nil.

Usage

BOOST_PP_LIST_IS_NIL(list)

Arguments

list
A list.

Remarks

If list is nil, this macro expands to 1.  Otherwise, it expands to 0.

Requirements

Header:  <boost/preprocessor/list/adt.hpp>

Sample Code

#include <boost/preprocessor/list/adt.hpp>

#define LIST (a, BOOST_PP_NIL)

BOOST_PP_LIST_IS_NIL(LIST) // expands to 0
BOOST_PP_LIST_IS_NIL(BOOST_PP_LIST_REST(LIST)) // expands to 1

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