1
//-----------------------------------------------------------------------------
2
// boost mpl/aux_/preprocessor/enum.hpp header file
3
// See http://www.boost.org for updates, documentation, and revision history.
4
//-----------------------------------------------------------------------------
6
// Copyright (c) 2000-02
9
// Permission to use, copy, modify, distribute and sell this software
10
// and its documentation for any purpose is hereby granted without fee,
11
// provided that the above copyright notice appears in all copies and
12
// that both the copyright notice and this permission notice appear in
13
// supporting documentation. No representations are made about the
14
// suitability of this software for any purpose. It is provided "as is"
15
// without express or implied warranty.
17
#ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED
18
#define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED
20
#include "boost/mpl/aux_/config/preprocessor.hpp"
22
// BOOST_MPL_PP_ENUM(0,int): <nothing>
23
// BOOST_MPL_PP_ENUM(1,int): int
24
// BOOST_MPL_PP_ENUM(2,int): int, int
25
// BOOST_MPL_PP_ENUM(n,int): int, int, .., int
27
#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES)
29
# include "boost/preprocessor/cat.hpp"
31
# define BOOST_MPL_PP_ENUM(n, param) \
32
BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \
35
# define BOOST_MPL_PP_ENUM_0(p)
36
# define BOOST_MPL_PP_ENUM_1(p) p
37
# define BOOST_MPL_PP_ENUM_2(p) p,p
38
# define BOOST_MPL_PP_ENUM_3(p) p,p,p
39
# define BOOST_MPL_PP_ENUM_4(p) p,p,p,p
40
# define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p
41
# define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p
42
# define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p
43
# define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p
44
# define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p
48
# include "boost/preprocessor/comma_if.hpp"
49
# include "boost/preprocessor/repeat.hpp"
51
# define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \
52
BOOST_PP_COMMA_IF(i) param \
55
# define BOOST_MPL_PP_ENUM(n, param) \
58
, BOOST_MPL_PP_AUX_ENUM_FUNC \
63
#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES
65
#endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED