Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2007-11-04 21:10:44


Author: djowel
Date: 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
New Revision: 40766
URL: http://svn.boost.org/trac/boost/changeset/40766

Log:
Workarounds for Fusion on IBM xlc
Text files modified:
   trunk/boost/config/compiler/vacpp.hpp | 3 +++
   trunk/boost/fusion/adapted/array/tag_of.hpp | 4 ++++
   trunk/boost/fusion/adapted/boost_tuple/tag_of.hpp | 8 ++++++++
   trunk/boost/fusion/adapted/std_pair.hpp | 4 ++++
   trunk/boost/fusion/adapted/variant/tag_of.hpp | 4 ++++
   trunk/boost/fusion/algorithm/transformation/transform.hpp | 4 ++++
   trunk/boost/fusion/algorithm/transformation/zip.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/deque_tie.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/list_tie.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/make_deque.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/make_list.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/make_map.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/make_set.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/make_vector.hpp | 7 +++++++
   trunk/boost/fusion/sequence/generation/map_tie.hpp | 8 ++++++++
   trunk/boost/fusion/sequence/generation/vector_tie.hpp | 7 +++++++
   trunk/boost/fusion/view/transform_view/transform_view.hpp | 4 ++++
   17 files changed, 102 insertions(+), 0 deletions(-)

Modified: trunk/boost/config/compiler/vacpp.hpp
==============================================================================
--- trunk/boost/config/compiler/vacpp.hpp (original)
+++ trunk/boost/config/compiler/vacpp.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -52,6 +52,9 @@
 # endif
 #endif
 
+// Some versions of the compiler have issues with default arguments on partial specializations
+#define BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS
+
 
 
 

Modified: trunk/boost/fusion/adapted/array/tag_of.hpp
==============================================================================
--- trunk/boost/fusion/adapted/array/tag_of.hpp (original)
+++ trunk/boost/fusion/adapted/array/tag_of.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -25,7 +25,11 @@
     namespace traits
     {
         template<typename T, std::size_t N>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct tag_of<boost::array<T,N>, void >
+#else
         struct tag_of<boost::array<T,N> >
+#endif
         {
             typedef array_tag type;
         };

Modified: trunk/boost/fusion/adapted/boost_tuple/tag_of.hpp
==============================================================================
--- trunk/boost/fusion/adapted/boost_tuple/tag_of.hpp (original)
+++ trunk/boost/fusion/adapted/boost_tuple/tag_of.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -33,13 +33,21 @@
             class T0, class T1, class T2, class T3, class T4,
             class T5, class T6, class T7, class T8, class T9
>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>, void >
+#else
         struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+#endif
         {
             typedef boost_tuple_tag type;
         };
 
         template <class Head, class Tail>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct tag_of<tuples::cons<Head, Tail>, void >
+#else
         struct tag_of<tuples::cons<Head, Tail> >
+#endif
         {
             typedef boost_tuple_tag type;
         };

Modified: trunk/boost/fusion/adapted/std_pair.hpp
==============================================================================
--- trunk/boost/fusion/adapted/std_pair.hpp (original)
+++ trunk/boost/fusion/adapted/std_pair.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -20,7 +20,11 @@
     namespace traits
     {
         template <typename T1, typename T2>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct tag_of<std::pair<T1, T2>, void >
+#else
         struct tag_of<std::pair<T1, T2> >
+#endif
         {
             typedef struct_tag type;
         };

Modified: trunk/boost/fusion/adapted/variant/tag_of.hpp
==============================================================================
--- trunk/boost/fusion/adapted/variant/tag_of.hpp (original)
+++ trunk/boost/fusion/adapted/variant/tag_of.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -18,7 +18,11 @@
     namespace traits
     {
         template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct tag_of<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, void >
+#else
         struct tag_of<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
+#endif
         {
             typedef variant_tag type;
         };

Modified: trunk/boost/fusion/algorithm/transformation/transform.hpp
==============================================================================
--- trunk/boost/fusion/algorithm/transformation/transform.hpp (original)
+++ trunk/boost/fusion/algorithm/transformation/transform.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -22,7 +22,11 @@
         };
 
         template <typename Sequence, typename F>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct transform<Sequence, F, void_>
+#else
         struct transform<Sequence, F>
+#endif
         {
             typedef transform_view<Sequence, F> type;
         };

Modified: trunk/boost/fusion/algorithm/transformation/zip.hpp
==============================================================================
--- trunk/boost/fusion/algorithm/transformation/zip.hpp (original)
+++ trunk/boost/fusion/algorithm/transformation/zip.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -17,6 +17,7 @@
 #include <boost/preprocessor/repetition/enum.hpp>
 #include <boost/preprocessor/repetition/enum_params.hpp>
 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
 #include <boost/preprocessor/arithmetic/inc.hpp>
 #include <boost/preprocessor/iteration/iterate.hpp>
 #include <boost/mpl/vector.hpp>
@@ -53,7 +54,13 @@
     namespace result_of
     {
         template< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T) >
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(ZIP_ITERATION), FUSION_MAX_ZIP_SEQUENCES, TEXT, void_) >
+ #undef TEXT
+#else
         struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) >
+#endif
         {
             typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences;
             typedef typename mpl::transform<sequences, add_reference<mpl::_> >::type ref_params;

Modified: trunk/boost/fusion/sequence/generation/deque_tie.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/deque_tie.hpp (original)
+++ trunk/boost/fusion/sequence/generation/deque_tie.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/list_tie.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/list_tie.hpp (original)
+++ trunk/boost/fusion/sequence/generation/list_tie.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/make_deque.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/make_deque.hpp (original)
+++ trunk/boost/fusion/sequence/generation/make_deque.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/make_list.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/make_list.hpp (original)
+++ trunk/boost/fusion/sequence/generation/make_list.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/make_map.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/make_map.hpp (original)
+++ trunk/boost/fusion/sequence/generation/make_map.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 @@
             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;
         };

Modified: trunk/boost/fusion/sequence/generation/make_set.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/make_set.hpp (original)
+++ trunk/boost/fusion/sequence/generation/make_set.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/make_vector.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/make_vector.hpp (original)
+++ trunk/boost/fusion/sequence/generation/make_vector.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/sequence/generation/map_tie.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/map_tie.hpp (original)
+++ trunk/boost/fusion/sequence/generation/map_tie.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 @@
             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;
         };

Modified: trunk/boost/fusion/sequence/generation/vector_tie.hpp
==============================================================================
--- trunk/boost/fusion/sequence/generation/vector_tie.hpp (original)
+++ trunk/boost/fusion/sequence/generation/vector_tie.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -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 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;
         };

Modified: trunk/boost/fusion/view/transform_view/transform_view.hpp
==============================================================================
--- trunk/boost/fusion/view/transform_view/transform_view.hpp (original)
+++ trunk/boost/fusion/view/transform_view/transform_view.hpp 2007-11-04 21:10:42 EST (Sun, 04 Nov 2007)
@@ -73,7 +73,11 @@
 
     // Unary Version
     template <typename Sequence, typename F>
+#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS)
+ struct transform_view<Sequence, F, void_> : sequence_base<transform_view<Sequence, F, void_> >
+#else
     struct transform_view<Sequence, F> : sequence_base<transform_view<Sequence, F> >
+#endif
     {
         typedef transform_view_tag fusion_tag;
         typedef fusion_sequence_tag tag; // this gets picked up by MPL


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk