Workarounds for Fusion on IBM xlc

[SVN r40766]
This commit is contained in:
Joel de Guzman
2007-11-05 02:10:42 +00:00
parent b9ab685b44
commit 1c5bc499a7
16 changed files with 99 additions and 0 deletions

View File

@ -14,6 +14,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
namespace boost { namespace fusion
@ -53,7 +54,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
};

View File

@ -13,6 +13,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/list/list.hpp>
namespace boost { namespace fusion
@ -53,7 +54,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) >
#undef TEXT
#else
struct list_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
};

View File

@ -19,6 +19,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
@ -72,7 +73,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};

View File

@ -12,6 +12,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/list/list.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
@ -65,7 +66,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct make_list< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_list<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};

View File

@ -12,6 +12,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp>
@ -77,7 +78,13 @@ namespace boost { namespace fusion
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
#undef TEXT
#else
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
};

View File

@ -12,6 +12,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/set/set.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp>
@ -67,7 +68,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct make_set< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_SET_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_set<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};

View File

@ -12,6 +12,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/vector/vector.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
@ -65,7 +66,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_vector<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};

View File

@ -13,6 +13,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/container/map/limits.hpp>
#include <boost/fusion/support/pair.hpp>
@ -80,7 +81,14 @@ namespace boost { namespace fusion
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
#undef TEXT
#else
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
};

View File

@ -13,6 +13,7 @@
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/vector/vector.hpp>
namespace boost { namespace fusion
@ -52,7 +53,13 @@ namespace boost { namespace fusion
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
#define TEXT(z, n, text) , text
struct vector_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) >
#undef TEXT
#else
struct vector_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
};