1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2001-2011 Hartmut Kaiser
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_SPIRIT_LOCALS_APRIL_03_2007_0506PM)
9 #define BOOST_SPIRIT_LOCALS_APRIL_03_2007_0506PM
15 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
16 #include <boost/preprocessor/repetition/enum_params.hpp>
17 #include <boost/mpl/vector.hpp>
18 #include <boost/mpl/bool.hpp>
20 #if !defined(BOOST_SPIRIT_MAX_LOCALS_SIZE)
21 # define BOOST_SPIRIT_MAX_LOCALS_SIZE 10
23 # if BOOST_SPIRIT_MAX_LOCALS_SIZE < 3
24 # undef BOOST_SPIRIT_MAX_LOCALS_SIZE
25 # define BOOST_SPIRIT_MAX_LOCALS_SIZE 10
29 namespace boost { namespace spirit
31 ///////////////////////////////////////////////////////////////////////////
33 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
34 BOOST_SPIRIT_MAX_LOCALS_SIZE, typename T, mpl::na)
37 : mpl::vector<BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, T)> {};
39 ///////////////////////////////////////////////////////////////////////////
47 template <BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, typename T)>
48 struct is_locals<locals<BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, T)> >