The BOOST_PP_LIST_ENUM macro converts a list to a comma-separated list.

#### Usage

BOOST_PP_LIST_ENUM(list)

#### Arguments

list
  The list to be converted.

#### Remarks

If list is, for example, (a, (b, (c, BOOST_PP_NIL))), this macro will produce:
a, b, c
Previously, this macro could not be used inside BOOST_PP_FOR. There is no longer any such restriction. It is more efficient, however, to use BOOST_PP_LIST_ENUM_R in such a situation.
In C++ 20 mode if the list is empty the resulting variadic data will be empty.

#### See Also

- BOOST_PP_LIST_ENUM_R

#### Requirements

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

#### Sample Code

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

    #define LIST (w, (x, (y, (z, BOOST_PP_NIL))))

    BOOST_PP_LIST_ENUM(LIST) // expands to w, x, y, z

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