Files

167 lines
5.9 KiB
C++

#ifdef ACTIV_BOOST_MSVC
#pragma warning(push)
#pragma warning(disable: 4512) // assignment operator could not be generated
#pragma warning(disable: 4510) // default constructor could not be generated
#pragma warning(disable: 4610) // can never be instantiated - user defined constructor required
#endif
#if !defined(ACTIV_BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#ifndef ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_HPP
#define ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_HPP
#include <ActivBoost/phoenix/core/limits.hpp>
#include <ActivBoost/phoenix/support/iterate.hpp>
#include <ActivBoost/preprocessor/repetition/enum_shifted_params.hpp>
#include <ActivBoost/fusion/adapted/struct/adapt_struct.hpp>
#define ACTIV_BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL ACTIV_BOOST_FUSION_ADAPT_TPL_STRUCT
#include <ActivBoost/phoenix/support/preprocessed/vector.hpp>
#endif
#else
#if !ACTIV_BOOST_PHOENIX_IS_ITERATING
#ifndef ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_HPP
#define ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_HPP
#include <ActivBoost/phoenix/core/limits.hpp>
#include <ActivBoost/phoenix/support/iterate.hpp>
#include <ActivBoost/preprocessor/repetition/enum_shifted_params.hpp>
#include <ActivBoost/fusion/adapted/struct/adapt_struct.hpp>
#define ACTIV_BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL ACTIV_BOOST_FUSION_ADAPT_TPL_STRUCT
#if defined(__WAVE__) && defined(ACTIV_BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector_" ACTIV_BOOST_PHOENIX_USER_LIMIT_STR ".hpp")
#endif
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if defined(__WAVE__) && defined(ACTIV_BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define M0(Z, N, D) \
typedef ACTIV_BOOST_PP_CAT(A, N) ACTIV_BOOST_PP_CAT(member_type, N); \
ACTIV_BOOST_PP_CAT(A, N) ACTIV_BOOST_PP_CAT(a, N); \
/**/
#define M1(Z, N, D) \
(ACTIV_BOOST_PP_CAT(A, N)) \
/**/
#define M2(Z, N, D) \
(ACTIV_BOOST_PP_CAT(T, N)) \
/**/
#define M3(Z, N, D) \
(ACTIV_BOOST_PP_CAT(A, N), ACTIV_BOOST_PP_CAT(a, N)) \
/**/
namespace Boost { namespace phoenix
{
template <typename Dummy = void>
struct vector0
{
typedef mpl::int_<0> size_type;
static const int size_value = 0;
};
template <int> struct vector_chooser;
template <>
struct vector_chooser<0>
{
template <typename Dummy = void>
struct apply
{
typedef vector0<> type;
};
};
}}
#define ACTIV_BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, ACTIV_BOOST_PP_INC(ACTIV_BOOST_PHOENIX_USER_LIMIT), \
<ActivBoost/phoenix/support/vector.hpp>))
#include ACTIV_BOOST_PHOENIX_ITERATE()
#undef M0
#undef M1
#undef M2
#undef M3
#if defined(__WAVE__) && defined(ACTIV_BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#else
namespace Boost { namespace phoenix
{
template <ACTIV_BOOST_PHOENIX_typename_A>
struct ACTIV_BOOST_PP_CAT(vector, ACTIV_BOOST_PHOENIX_ITERATION)
{
ACTIV_BOOST_PP_REPEAT(ACTIV_BOOST_PHOENIX_ITERATION, M0, _)
typedef mpl::int_<ACTIV_BOOST_PHOENIX_ITERATION> size_type;
static const int size_value = ACTIV_BOOST_PHOENIX_ITERATION;
typedef
ACTIV_BOOST_PP_CAT(vector, ACTIV_BOOST_PP_DEC(ACTIV_BOOST_PHOENIX_ITERATION))<ACTIV_BOOST_PP_ENUM_SHIFTED_PARAMS(ACTIV_BOOST_PHOENIX_ITERATION, A)>
args_type;
args_type args() const
{
args_type r = {ACTIV_BOOST_PP_ENUM_SHIFTED_PARAMS(ACTIV_BOOST_PHOENIX_ITERATION, a)};
return r;
}
};
template <>
struct vector_chooser<ACTIV_BOOST_PHOENIX_ITERATION>
{
template <ACTIV_BOOST_PHOENIX_typename_A>
struct apply
{
typedef ACTIV_BOOST_PP_CAT(vector, ACTIV_BOOST_PHOENIX_ITERATION)<ACTIV_BOOST_PHOENIX_A> type;
};
};
}}
#define ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0 \
ACTIV_BOOST_PP_REPEAT(ACTIV_BOOST_PHOENIX_ITERATION, M1, _) \
/**/
#define ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1 \
( \
ACTIV_BOOST_PP_CAT( \
Boost::phoenix::vector \
, ACTIV_BOOST_PHOENIX_ITERATION \
) \
) \
ACTIV_BOOST_PP_REPEAT(ACTIV_BOOST_PHOENIX_ITERATION, M1, _) \
/**/
#define ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2 \
ACTIV_BOOST_PP_REPEAT(ACTIV_BOOST_PHOENIX_ITERATION, M3, _) \
/**/
ACTIV_BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0
, ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1
, ACTIV_BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2
)
#endif
#endif
#ifdef ACTIV_BOOST_MSVC
#pragma warning(pop)
#endif