diff --git a/doc/container.qbk b/doc/container.qbk index d6b16c35..ad7f5c7e 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1470,6 +1470,10 @@ rules for __element_conversion__. Returns the result type of __make_map__. +The implementation depends on the support of variadic templates. + +When variadic templates are not supported, make_map is a metafunction of the form: + [heading Synopsis] template < @@ -1487,6 +1491,18 @@ default. Example: #define FUSION_MAX_MAP_SIZE 20 +When variadic templates are supported, make_map is a metafunction class of the form: + +[heading Synopsis] + + template < + typename K0, typename K1,... typename KN> + struct make_map + { + struct apply< + typename T0, typename T1,... typename TN> + }; + [heading Parameters] [table @@ -1497,9 +1513,16 @@ default. Example: [heading Expression Semantics] + #if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) resulf_of::make_map::type; + #else + resulf_of::make_map::apply::type; + #endif [*Return type]: __result_of_make_map__`::type` +when variadic templates are not supported, or +__result_of_make_map__`::apply::type` +when variadic templates are supported. [*Semantics]: A __map__ with __fusion_pair__ elements where the `second_type` is converted following the rules for __element_conversion__. @@ -1513,7 +1536,11 @@ default. Example: [heading Example] + #if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) result_of::make_map::type + #else + result_of::make_map::apply::type + #endif [heading See also] diff --git a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index 87ab09fa..d720fcf8 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -392,9 +392,9 @@ typename boost_fusion_detail_It1::index \ >::type type; \ \ - BOOST_FUSION_GPU_ENABLED \ - static type call(boost_fusion_detail_It1 const& it1, \ - boost_fusion_detail_It2 const& it2) \ + BOOST_FUSION_GPU_ENABLED \ + static type call(boost_fusion_detail_It1 const& /* it1 */, \ + boost_fusion_detail_It2 const& /* it2 */) \ { \ return type(); \ } \ diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp index b86847ee..1d294a87 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { template struct iter_fold_lvalue_state - : boost::result_of< + : fusion::detail::result_of_with_decltype< F( typename add_reference::type>::type, It&) @@ -272,7 +272,7 @@ namespace boost { namespace fusion { typedef typename result_of_unrolled_iter_fold< - typename boost::result_of< + typename fusion::detail::result_of_with_decltype< F( StateRef, It0 const& diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp index 95122c8e..94789782 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { template struct reverse_fold_lvalue_state - : boost::result_of< + : fusion::detail::result_of_with_decltype< F( typename add_reference::type>::type, typename fusion::result_of::deref::type) @@ -272,7 +272,7 @@ namespace boost { namespace fusion { typedef typename result_of_unrolled_reverse_fold< - typename boost::result_of< + typename fusion::detail::result_of_with_decltype< F( StateRef, typename fusion::result_of::deref< It0 const>::type diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp index 3dc434fc..bf1edca5 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { template struct reverse_iter_fold_lvalue_state - : boost::result_of< + : fusion::detail::result_of_with_decltype< F( typename add_reference::type>::type, It&) @@ -272,7 +272,7 @@ namespace boost { namespace fusion { typedef typename result_of_unrolled_reverse_iter_fold< - typename boost::result_of< + typename fusion::detail::result_of_with_decltype< F( StateRef, It0 const& diff --git a/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp index 650cd704..173a4924 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp @@ -23,6 +23,8 @@ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + template struct as_deque; @@ -43,6 +45,8 @@ namespace boost { namespace fusion { namespace detail return deque<>(); } }; + +BOOST_FUSION_BARRIER_END }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -67,6 +71,8 @@ namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ typedef typename fusion::result_of::next::type \ BOOST_PP_CAT(I, BOOST_PP_INC(n)); @@ -87,6 +93,7 @@ namespace boost { namespace fusion { namespace detail #undef BOOST_FUSION_NEXT_CALL_ITERATOR #undef BOOST_FUSION_VALUE_OF_ITERATOR +BOOST_FUSION_BARRIER_END }}} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp index e573efb7..159995e9 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_deque<1> { @@ -218,4 +219,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp index b3b7f158..abdbd8ca 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_deque<1> { @@ -428,4 +429,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp index 18b4662c..b85f3beb 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_deque<1> { @@ -638,4 +639,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp index ec44a2b0..eab845f1 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_deque<1> { @@ -848,4 +849,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp index 6c83aed4..e3c8376e 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_deque<1> { @@ -1058,4 +1059,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39 , *i40 , *i41 , *i42 , *i43 , *i44 , *i45 , *i46 , *i47 , *i48 , *i49); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/cpp03/as_map.hpp b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp index 62748be1..4af79522 100644 --- a/include/boost/fusion/container/map/detail/cpp03/as_map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp @@ -22,6 +22,8 @@ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + template struct as_map; @@ -42,6 +44,8 @@ namespace boost { namespace fusion { namespace detail return map<>(); } }; + +BOOST_FUSION_BARRIER_END }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -66,6 +70,8 @@ namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ typedef typename fusion::result_of::next::type \ BOOST_PP_CAT(I, BOOST_PP_INC(n)); @@ -90,6 +96,7 @@ namespace boost { namespace fusion { namespace detail #undef BOOST_FUSION_PAIR_FROM_ITERATOR #undef BOOST_FUSION_DREF_CALL_ITERATOR +BOOST_FUSION_BARRIER_END }}} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp index c5273214..d39a27be 100644 --- a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template struct as_map<1, is_assoc> { @@ -218,4 +219,5 @@ namespace boost { namespace fusion { namespace detail return result(gen::D0::call(i0) , gen::D1::call(i1) , gen::D2::call(i2) , gen::D3::call(i3) , gen::D4::call(i4) , gen::D5::call(i5) , gen::D6::call(i6) , gen::D7::call(i7) , gen::D8::call(i8) , gen::D9::call(i9)); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp index b62cf675..9caafd34 100644 --- a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template struct as_map<1, is_assoc> { @@ -428,4 +429,5 @@ namespace boost { namespace fusion { namespace detail return result(gen::D0::call(i0) , gen::D1::call(i1) , gen::D2::call(i2) , gen::D3::call(i3) , gen::D4::call(i4) , gen::D5::call(i5) , gen::D6::call(i6) , gen::D7::call(i7) , gen::D8::call(i8) , gen::D9::call(i9) , gen::D10::call(i10) , gen::D11::call(i11) , gen::D12::call(i12) , gen::D13::call(i13) , gen::D14::call(i14) , gen::D15::call(i15) , gen::D16::call(i16) , gen::D17::call(i17) , gen::D18::call(i18) , gen::D19::call(i19)); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp index bb2c6d53..7c96b271 100644 --- a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template struct as_map<1, is_assoc> { @@ -638,4 +639,5 @@ namespace boost { namespace fusion { namespace detail return result(gen::D0::call(i0) , gen::D1::call(i1) , gen::D2::call(i2) , gen::D3::call(i3) , gen::D4::call(i4) , gen::D5::call(i5) , gen::D6::call(i6) , gen::D7::call(i7) , gen::D8::call(i8) , gen::D9::call(i9) , gen::D10::call(i10) , gen::D11::call(i11) , gen::D12::call(i12) , gen::D13::call(i13) , gen::D14::call(i14) , gen::D15::call(i15) , gen::D16::call(i16) , gen::D17::call(i17) , gen::D18::call(i18) , gen::D19::call(i19) , gen::D20::call(i20) , gen::D21::call(i21) , gen::D22::call(i22) , gen::D23::call(i23) , gen::D24::call(i24) , gen::D25::call(i25) , gen::D26::call(i26) , gen::D27::call(i27) , gen::D28::call(i28) , gen::D29::call(i29)); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp index 1c4d7c60..ec5c3d64 100644 --- a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template struct as_map<1, is_assoc> { @@ -848,4 +849,5 @@ namespace boost { namespace fusion { namespace detail return result(gen::D0::call(i0) , gen::D1::call(i1) , gen::D2::call(i2) , gen::D3::call(i3) , gen::D4::call(i4) , gen::D5::call(i5) , gen::D6::call(i6) , gen::D7::call(i7) , gen::D8::call(i8) , gen::D9::call(i9) , gen::D10::call(i10) , gen::D11::call(i11) , gen::D12::call(i12) , gen::D13::call(i13) , gen::D14::call(i14) , gen::D15::call(i15) , gen::D16::call(i16) , gen::D17::call(i17) , gen::D18::call(i18) , gen::D19::call(i19) , gen::D20::call(i20) , gen::D21::call(i21) , gen::D22::call(i22) , gen::D23::call(i23) , gen::D24::call(i24) , gen::D25::call(i25) , gen::D26::call(i26) , gen::D27::call(i27) , gen::D28::call(i28) , gen::D29::call(i29) , gen::D30::call(i30) , gen::D31::call(i31) , gen::D32::call(i32) , gen::D33::call(i33) , gen::D34::call(i34) , gen::D35::call(i35) , gen::D36::call(i36) , gen::D37::call(i37) , gen::D38::call(i38) , gen::D39::call(i39)); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp index e9cec05b..3f347b03 100644 --- a/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template struct as_map<1, is_assoc> { @@ -1058,4 +1059,5 @@ namespace boost { namespace fusion { namespace detail return result(gen::D0::call(i0) , gen::D1::call(i1) , gen::D2::call(i2) , gen::D3::call(i3) , gen::D4::call(i4) , gen::D5::call(i5) , gen::D6::call(i6) , gen::D7::call(i7) , gen::D8::call(i8) , gen::D9::call(i9) , gen::D10::call(i10) , gen::D11::call(i11) , gen::D12::call(i12) , gen::D13::call(i13) , gen::D14::call(i14) , gen::D15::call(i15) , gen::D16::call(i16) , gen::D17::call(i17) , gen::D18::call(i18) , gen::D19::call(i19) , gen::D20::call(i20) , gen::D21::call(i21) , gen::D22::call(i22) , gen::D23::call(i23) , gen::D24::call(i24) , gen::D25::call(i25) , gen::D26::call(i26) , gen::D27::call(i27) , gen::D28::call(i28) , gen::D29::call(i29) , gen::D30::call(i30) , gen::D31::call(i31) , gen::D32::call(i32) , gen::D33::call(i33) , gen::D34::call(i34) , gen::D35::call(i35) , gen::D36::call(i36) , gen::D37::call(i37) , gen::D38::call(i38) , gen::D39::call(i39) , gen::D40::call(i40) , gen::D41::call(i41) , gen::D42::call(i42) , gen::D43::call(i43) , gen::D44::call(i44) , gen::D45::call(i45) , gen::D46::call(i46) , gen::D47::call(i47) , gen::D48::call(i48) , gen::D49::call(i49)); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/map/detail/map_impl.hpp b/include/boost/fusion/container/map/detail/map_impl.hpp index f70d1392..2e0f50cc 100644 --- a/include/boost/fusion/container/map/detail/map_impl.hpp +++ b/include/boost/fusion/container/map/detail/map_impl.hpp @@ -38,12 +38,12 @@ namespace boost { namespace fusion { namespace detail template BOOST_FUSION_GPU_ENABLED - map_impl(Iterator const& iter, map_impl_from_iterator) + map_impl(Iterator const&, map_impl_from_iterator) {} template BOOST_FUSION_GPU_ENABLED - void assign(Iterator const& iter, map_impl_from_iterator) + void assign(Iterator const&, map_impl_from_iterator) {} BOOST_FUSION_GPU_ENABLED diff --git a/include/boost/fusion/container/set/detail/as_set.hpp b/include/boost/fusion/container/set/detail/as_set.hpp index 26a719e3..a1e8cb7b 100644 --- a/include/boost/fusion/container/set/detail/as_set.hpp +++ b/include/boost/fusion/container/set/detail/as_set.hpp @@ -22,6 +22,8 @@ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + template struct as_set; @@ -42,6 +44,8 @@ namespace boost { namespace fusion { namespace detail return set<>(); } }; + +BOOST_FUSION_BARRIER_END }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -66,6 +70,8 @@ namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ typedef typename fusion::result_of::next::type \ BOOST_PP_CAT(I, BOOST_PP_INC(n)); @@ -86,6 +92,7 @@ namespace boost { namespace fusion { namespace detail #undef BOOST_FUSION_NEXT_CALL_ITERATOR #undef BOOST_FUSION_VALUE_OF_ITERATOR +BOOST_FUSION_BARRIER_END }}} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp b/include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp index f285cd5a..dda71499 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp +++ b/include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_set<1> { @@ -218,4 +219,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp b/include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp index b7ad7fa3..8ecb2b7f 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp +++ b/include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_set<1> { @@ -428,4 +429,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp b/include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp index 7a97a8e5..d91566d0 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp +++ b/include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_set<1> { @@ -638,4 +639,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp b/include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp index 8e98f68a..1facc1d3 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp +++ b/include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_set<1> { @@ -848,4 +849,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp b/include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp index 6cefd9a1..fd0848a3 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp +++ b/include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_set<1> { @@ -1058,4 +1059,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39 , *i40 , *i41 , *i42 , *i43 , *i44 , *i45 , *i46 , *i47 , *i48 , *i49); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/vector/detail/as_vector.hpp b/include/boost/fusion/container/vector/detail/as_vector.hpp index 2224fcc6..368557d0 100644 --- a/include/boost/fusion/container/vector/detail/as_vector.hpp +++ b/include/boost/fusion/container/vector/detail/as_vector.hpp @@ -22,6 +22,8 @@ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN + template struct as_vector; @@ -42,6 +44,8 @@ namespace boost { namespace fusion { namespace detail return vector0<>(); } }; + +BOOST_FUSION_BARRIER_END }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -66,6 +70,7 @@ namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ typedef typename fusion::result_of::next::type \ @@ -87,6 +92,7 @@ namespace boost { namespace fusion { namespace detail #undef BOOST_FUSION_NEXT_CALL_ITERATOR #undef BOOST_FUSION_VALUE_OF_ITERATOR +BOOST_FUSION_BARRIER_END }}} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp b/include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp index 8a48beda..53f2f164 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_vector<1> { @@ -218,4 +219,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp b/include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp index 63bb0d58..c42a60cc 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_vector<1> { @@ -428,4 +429,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp b/include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp index 8888b2d8..fd94d1f3 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_vector<1> { @@ -638,4 +639,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp b/include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp index cfd7b055..8a712cf8 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_vector<1> { @@ -848,4 +849,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp b/include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp index ea42ba2f..761ca9cc 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp @@ -8,6 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { namespace detail { +BOOST_FUSION_BARRIER_BEGIN template <> struct as_vector<1> { @@ -1058,4 +1059,5 @@ namespace boost { namespace fusion { namespace detail return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23 , *i24 , *i25 , *i26 , *i27 , *i28 , *i29 , *i30 , *i31 , *i32 , *i33 , *i34 , *i35 , *i36 , *i37 , *i38 , *i39 , *i40 , *i41 , *i42 , *i43 , *i44 , *i45 , *i46 , *i47 , *i48 , *i49); } }; +BOOST_FUSION_BARRIER_END }}} diff --git a/include/boost/fusion/support/config.hpp b/include/boost/fusion/support/config.hpp index 16e38f95..5bee7df8 100644 --- a/include/boost/fusion/support/config.hpp +++ b/include/boost/fusion/support/config.hpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2014 Eric Niebler + Copyright (c) 2014 Kohei Takahashi 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) @@ -13,4 +14,29 @@ #define BOOST_FUSION_GPU_ENABLED BOOST_GPU_ENABLED #endif +// Enclose with inline namespace because unqualified lookup of GCC < 4.5 is broken. +// +// namespace detail { +// struct foo; +// struct X { }; +// } +// +// template void foo(T) { } +// +// int main() +// { +// foo(detail::X()); +// // prog.cc: In function 'int main()': +// // prog.cc:2: error: 'struct detail::foo' is not a function, +// // prog.cc:6: error: conflict with 'template void foo(T)' +// // prog.cc:10: error: in call to 'foo' +// } +namespace boost { namespace fusion { namespace detail +{ + namespace barrier { } + using namespace barrier; +}}} +#define BOOST_FUSION_BARRIER_BEGIN namespace barrier { +#define BOOST_FUSION_BARRIER_END } + #endif diff --git a/include/boost/fusion/support/detail/result_of.hpp b/include/boost/fusion/support/detail/result_of.hpp index ff48dac9..e53ea9e3 100644 --- a/include/boost/fusion/support/detail/result_of.hpp +++ b/include/boost/fusion/support/detail/result_of.hpp @@ -7,8 +7,14 @@ #if !defined(FUSION_RESULT_OF_10272014_0654) #define FUSION_RESULT_OF_10272014_0654 +#include #include -#if !(defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)) + +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#define BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF +#endif + +#if !defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) #include #include #include @@ -21,12 +27,12 @@ namespace boost { namespace fusion { namespace detail // low level code. So far this is used only in the fold algorithm. This will // be removed once we overhaul fold. -#if defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) template struct result_of_with_decltype : boost::tr1_result_of {}; -#else +#else // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result) @@ -40,7 +46,7 @@ namespace boost { namespace fusion { namespace detail boost::tr1_result_of, boost::detail::cpp0x_result_of >::type {}; -#endif +#endif // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) }}} diff --git a/preprocess/wave.cfg b/preprocess/wave.cfg index d6744de0..3fd87116 100644 --- a/preprocess/wave.cfg +++ b/preprocess/wave.cfg @@ -21,6 +21,8 @@ -NBOOST_FUSION_HAS_VARIADIC_MAP -NBOOST_FUSION_VECTOR_COPY_INIT -NBOOST_FUSION_VECTOR_CTOR_HELPER +-NBOOST_FUSION_BARRIER_BEGIN +-NBOOST_FUSION_BARRIER_END -S..\include -S..\..\.. -S"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE" diff --git a/test/algorithm/fold.cpp b/test/algorithm/fold.cpp index 2df01adf..249f1bb3 100644 --- a/test/algorithm/fold.cpp +++ b/test/algorithm/fold.cpp @@ -132,7 +132,7 @@ struct functor struct visitor { - using result_type = int; + typedef int result_type; int operator()(int sum, long&) { @@ -238,7 +238,7 @@ main() } { -#if !defined(BOOST_NO_CXX11_DECLTYPE) +#if !defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) { boost::fusion::vector container{1, 2, 3}; functor f; diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp index 9cbd8ea0..e849ce9b 100644 --- a/test/sequence/define_struct_inline.cpp +++ b/test/sequence/define_struct_inline.cpp @@ -1,8 +1,8 @@ /*============================================================================= Copyright (c) 2010, 2012 Christopher Schmidt, Nathan Ridge - Distributed under the Boost Software Liceclse, Version 1.0. (See accompanying - file LICEclsE_1_0.txt or copy at http://www.boost.org/LICEclsE_1_0.txt) + 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) ==============================================================================*/ #include diff --git a/test/sequence/std_tuple_auto_conv.cpp b/test/sequence/std_tuple_auto_conv.cpp index ebd83910..a297e2b5 100644 --- a/test/sequence/std_tuple_auto_conv.cpp +++ b/test/sequence/std_tuple_auto_conv.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + Copyright (c) 2008 Joel de Guzman + + 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) +==============================================================================*/ #include #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \ diff --git a/test/sequence/test_deduce_sequence.cpp b/test/sequence/test_deduce_sequence.cpp index d137cd30..d7a3b813 100644 --- a/test/sequence/test_deduce_sequence.cpp +++ b/test/sequence/test_deduce_sequence.cpp @@ -1,3 +1,9 @@ +/*============================================================================= + Copyright (c) 2009 Joel de Guzman + + 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) +==============================================================================*/ #include #include