From 21301c93dc6503a5cb7c26e3077e6ae3c96f597a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 00:47:40 +0000 Subject: [PATCH 01/99] Fix for ticket #6000 [SVN r74870] --- .../algorithm/transformation/pop_back.hpp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/include/boost/fusion/algorithm/transformation/pop_back.hpp b/include/boost/fusion/algorithm/transformation/pop_back.hpp index 37f64326..29de95b3 100644 --- a/include/boost/fusion/algorithm/transformation/pop_back.hpp +++ b/include/boost/fusion/algorithm/transformation/pop_back.hpp @@ -78,6 +78,51 @@ namespace boost { namespace fusion , mpl::int_<(Last::is_last?1:0)> >::type {}; + + + template + struct prior_impl + { + typedef typename Iterator::iterator_base_type base_type; + + typedef typename + result_of::prior::type + base_prior; + + typedef pop_back_iterator type; + + static type + call(Iterator const& i) + { + return type(fusion::prior(i.iterator_base)); + } + }; + + template + struct prior_impl + { + // If this is the last iterator, we'll have to double back + typedef typename Iterator::iterator_base_type base_type; + + typedef typename + result_of::prior< + typename result_of::prior::type + >::type + base_prior; + + typedef pop_back_iterator type; + + static type + call(Iterator const& i) + { + return type(fusion::prior( + fusion::prior(i.iterator_base))); + } + }; + + template + struct prior : prior_impl + {}; }; namespace result_of From f46b2aeb732532b18cd58418a673e59563c05b7b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 00:58:24 +0000 Subject: [PATCH 02/99] Fix for ticket #6000 [SVN r74871] --- include/boost/fusion/algorithm/transformation/pop_back.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/fusion/algorithm/transformation/pop_back.hpp b/include/boost/fusion/algorithm/transformation/pop_back.hpp index 29de95b3..6059c555 100644 --- a/include/boost/fusion/algorithm/transformation/pop_back.hpp +++ b/include/boost/fusion/algorithm/transformation/pop_back.hpp @@ -80,7 +80,7 @@ namespace boost { namespace fusion {}; - template + template struct prior_impl { typedef typename Iterator::iterator_base_type base_type; From 4be9e08af7179331f56f3e1895b4e7dcbd834e19 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 00:59:32 +0000 Subject: [PATCH 03/99] Fix for ticket #6000 [SVN r74872] --- test/algorithm/pop_back.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/algorithm/pop_back.cpp b/test/algorithm/pop_back.cpp index 253589b3..a96106d1 100644 --- a/test/algorithm/pop_back.cpp +++ b/test/algorithm/pop_back.cpp @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include int @@ -85,12 +88,17 @@ main() auto i1 = find(popv); auto i2 = find(pop); - assert(i1 != end(pop)); - assert(i2 != end(pop)); - assert(i1 != i2); + BOOST_TEST(i1 != end(pop)); + BOOST_TEST(i2 != end(pop)); + BOOST_TEST(i1 != i2); } #endif + { + boost::array a = { 10, 50 }; + BOOST_TEST(back(pop_back(a)) == 10); + } + return boost::report_errors(); } From b6df98e86c08c30342afc3d59bd963bbfd686d49 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 09:55:41 +0000 Subject: [PATCH 04/99] Made map random access. Thanks to Brandon Kohn! [SVN r74881] --- .../fusion/container/map/detail/at_impl.hpp | 57 +++++++++++++++++++ .../map/detail/preprocessed/map10.hpp | 2 +- .../map/detail/preprocessed/map20.hpp | 2 +- .../map/detail/preprocessed/map30.hpp | 2 +- .../map/detail/preprocessed/map40.hpp | 2 +- .../map/detail/preprocessed/map50.hpp | 2 +- .../container/map/detail/value_at_impl.hpp | 34 +++++++++++ include/boost/fusion/container/map/map.hpp | 4 +- 8 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 include/boost/fusion/container/map/detail/at_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/value_at_impl.hpp diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp new file mode 100644 index 00000000..f871bee0 --- /dev/null +++ b/include/boost/fusion/container/map/detail/at_impl.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Brandon Kohn + + 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(BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP) +#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef mpl::at element; + typedef typename detail::ref_result::type type; + + static type + call(Sequence& m) + { + return m.get_data().at_impl(N()); + } + }; + + template + struct apply + { + typedef mpl::at element; + typedef typename detail::cref_result::type type; + + static type + call(Sequence const& m) + { + return m.get_data().at_impl(N()); + } + }; + }; + } +}} + +#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP diff --git a/include/boost/fusion/container/map/detail/preprocessed/map10.hpp b/include/boost/fusion/container/map/detail/preprocessed/map10.hpp index cae643d8..fdf28eb2 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map10.hpp +++ b/include/boost/fusion/container/map/detail/preprocessed/map10.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; typedef mpl::false_ is_view; diff --git a/include/boost/fusion/container/map/detail/preprocessed/map20.hpp b/include/boost/fusion/container/map/detail/preprocessed/map20.hpp index 01105265..33cd2e59 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map20.hpp +++ b/include/boost/fusion/container/map/detail/preprocessed/map20.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; typedef mpl::false_ is_view; diff --git a/include/boost/fusion/container/map/detail/preprocessed/map30.hpp b/include/boost/fusion/container/map/detail/preprocessed/map30.hpp index ede29720..54f492d0 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map30.hpp +++ b/include/boost/fusion/container/map/detail/preprocessed/map30.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; typedef mpl::false_ is_view; diff --git a/include/boost/fusion/container/map/detail/preprocessed/map40.hpp b/include/boost/fusion/container/map/detail/preprocessed/map40.hpp index 6a75d2c6..7060a670 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map40.hpp +++ b/include/boost/fusion/container/map/detail/preprocessed/map40.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; typedef mpl::false_ is_view; diff --git a/include/boost/fusion/container/map/detail/preprocessed/map50.hpp b/include/boost/fusion/container/map/detail/preprocessed/map50.hpp index f9c36302..1da73641 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map50.hpp +++ b/include/boost/fusion/container/map/detail/preprocessed/map50.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; typedef mpl::false_ is_view; diff --git a/include/boost/fusion/container/map/detail/value_at_impl.hpp b/include/boost/fusion/container/map/detail/value_at_impl.hpp new file mode 100644 index 00000000..31d9b383 --- /dev/null +++ b/include/boost/fusion/container/map/detail/value_at_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Brandon Kohn + + 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(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename mpl::at::type type; + }; + }; + } +}} + +#endif //BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index d61df914..5152e6e1 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -50,7 +52,7 @@ namespace boost { namespace fusion template struct map : sequence_base > { - struct category : forward_traversal_tag, associative_tag {}; + struct category : random_access_traversal_tag, associative_tag {}; typedef map_tag fusion_tag; typedef fusion_sequence_tag tag; // this gets picked up by MPL From 10274e7884d0f3693b8154970e0066b0e4b866f2 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 09:55:52 +0000 Subject: [PATCH 05/99] Made map random access. Thanks to Brandon Kohn! [SVN r74882] --- doc/container.qbk | 4 +-- doc/iterator.qbk | 2 ++ doc/sequence.qbk | 2 ++ test/sequence/map.cpp | 52 +++++++++++++++++++++++++++++----- test/sequence/reverse_view.cpp | 22 ++++++++++++++ 5 files changed, 73 insertions(+), 9 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 83c10c1a..901417f0 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -419,7 +419,7 @@ including any Fusion header to change the default. Example: [heading Model of] * __associative_sequence__ -* __forward_sequence__ +* __random_access_sequence__ [variablelist Notation [[`M`] [A `map` type]] @@ -431,7 +431,7 @@ including any Fusion header to change the default. Example: [heading Expression Semantics] Semantics of an expression is defined only where it differs from, or is not -defined in __random_access_sequence__ and __associative_sequence__. +defined in __forward_sequence__ and __associative_sequence__. [table [[Expression] [Semantics]] diff --git a/doc/iterator.qbk b/doc/iterator.qbk index 8e076e53..2575f275 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -160,6 +160,7 @@ the following invariants always hold: * __std_pair__ iterator * __boost_array__ iterator * __vector__ iterator +* __map__ iterator * __single_view__ iterator * __iterator_range__ (where adapted sequence is a __bidirectional_sequence__) * __transform_view__ (where adapted sequence is a __bidirectional_sequence__) @@ -205,6 +206,7 @@ the following expressions must be valid: [heading Models] * __vector__ iterator +* __map__ iterator * __std_pair__ iterator * __boost_array__ iterator * __single_view__ iterator diff --git a/doc/sequence.qbk b/doc/sequence.qbk index adb7c7af..e86156a5 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -188,6 +188,7 @@ are not defined in __forward_sequence__. * __std_pair__ * __boost_array__ * __vector__ +* __map__ * __reverse_view__ * __single_view__ * __iterator_range__ (where adapted sequence is a Bidirectional Sequence) @@ -264,6 +265,7 @@ are not defined in __bidirectional_sequence__. * __std_pair__ * __boost_array__ * __vector__ +* __map__ * __reverse_view__ * __single_view__ * __iterator_range__ (where adapted sequence is a Random Access Sequence) diff --git a/test/sequence/map.cpp b/test/sequence/map.cpp index b149d24e..265510f6 100644 --- a/test/sequence/map.cpp +++ b/test/sequence/map.cpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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 @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include @@ -39,18 +41,19 @@ main() { typedef map< pair - , pair > + , pair > map_type; BOOST_MPL_ASSERT((traits::is_associative)); - + BOOST_MPL_ASSERT((traits::is_random_access)); + map_type m( make_pair('X') , make_pair("Men")); - + std::cout << at_key(m) << std::endl; std::cout << at_key(m) << std::endl; - + BOOST_TEST(at_key(m) == 'X'); BOOST_TEST(at_key(m) == "Men"); @@ -58,7 +61,7 @@ main() boost::is_same::type, char>::value)); BOOST_STATIC_ASSERT(( boost::is_same::type, std::string>::value)); - + std::cout << m << std::endl; BOOST_STATIC_ASSERT((boost::fusion::result_of::has_key::value)); @@ -75,8 +78,43 @@ main() BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, double>::value)); BOOST_STATIC_ASSERT((boost::is_same::type>::type, char>::value)); BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, std::string>::value)); + + //! Test random access interface. + pair a = at_c<0>(m); + pair b = at_c<1>(m); } - + + //! iterators & random access interface. + { + typedef pair, std::string> pair0; + typedef pair, std::string> pair1; + typedef pair, std::string> pair2; + typedef pair, std::string> pair3; + typedef pair, std::string> pair4; + + typedef map< pair0, pair1, pair2, pair3, pair4 > map_type; + map_type m( pair0("zero"), pair1("one"), pair2("two"), pair3("three"), pair4("four") ); + BOOST_AUTO( it0, begin(m) ); + BOOST_TEST((deref(it0) == pair0("zero"))); + BOOST_AUTO( it1, fusion::next(it0) ); + BOOST_TEST((deref(it1) == pair1("one"))); + BOOST_AUTO( it2, fusion::next(it1) ); + BOOST_TEST((deref(it2) == pair2("two"))); + BOOST_AUTO( it3, fusion::next(it2) ); + BOOST_TEST((deref(it3) == pair3("three"))); + BOOST_AUTO( it4, fusion::next(it3) ); + BOOST_TEST((deref(it4) == pair4("four"))); + + BOOST_TEST((deref(fusion::advance_c<4>(it0)) == deref(it4))); + + //! Bi-directional + BOOST_TEST((deref(fusion::prior(it4)) == deref(it3) )); + BOOST_TEST((deref(fusion::prior(it3)) == deref(it2) )); + BOOST_TEST((deref(fusion::prior(it2)) == deref(it1) )); + BOOST_TEST((deref(fusion::prior(it1)) == deref(it0) )); + + } + { std::cout << make_map('X', 123) << std::endl; BOOST_TEST(at_key(make_map('X', 123)) == 'X'); diff --git a/test/sequence/reverse_view.cpp b/test/sequence/reverse_view.cpp index 36bda96c..fb96275d 100644 --- a/test/sequence/reverse_view.cpp +++ b/test/sequence/reverse_view.cpp @@ -6,6 +6,7 @@ ==============================================================================*/ #include #include +#include #include #include #include @@ -82,6 +83,27 @@ main() )); } + //! Map + { + typedef pair, std::string> pair0; + typedef pair, std::string> pair1; + typedef pair, std::string> pair2; + typedef pair, std::string> pair3; + typedef pair, std::string> pair4; + + typedef map< pair0, pair1, pair2, pair3, pair4 > map_type; + map_type m( pair0("zero"), pair1("one"), pair2("two"), pair3("three"), pair4("four") ); + typedef reverse_view view_type; + view_type rev(m); + std::cout << rev << std::endl; + BOOST_TEST((rev == make_vector( pair4("four"), pair3("three"), pair2("two"), pair1("one"), pair0("zero")))); + BOOST_TEST((at_c<0>(rev) == pair4("four"))); + BOOST_TEST((at_c<1>(rev) == pair3("three"))); + BOOST_TEST((at_c<2>(rev) == pair2("two"))); + BOOST_TEST((at_c<3>(rev) == pair1("one"))); + BOOST_TEST((at_c<4>(rev) == pair0("zero"))); + } + return boost::report_errors(); } From 459a1dba3d343f9163ca7663888717785f978823 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 10:05:49 +0000 Subject: [PATCH 06/99] Bumped copyright date and version to 2.1 (it's about time!). [SVN r74883] --- doc/Jamfile | 2 +- doc/acknowledgements.qbk | 2 +- doc/adapted.qbk | 2 +- doc/algorithm.qbk | 2 +- doc/changelog.qbk | 10 +++++----- doc/container.qbk | 2 +- doc/extension.qbk | 2 +- doc/functional.qbk | 2 +- doc/fusion.qbk | 6 +++--- doc/introduction.qbk | 2 +- doc/iterator.qbk | 2 +- doc/notes.qbk | 2 +- doc/organization.qbk | 2 +- doc/preface.qbk | 2 +- doc/quick_start.qbk | 2 +- doc/references.qbk | 2 +- doc/sequence.qbk | 2 +- doc/support.qbk | 2 +- doc/tuple.qbk | 2 +- doc/view.qbk | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/Jamfile b/doc/Jamfile index 13454575..8348f7eb 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -1,5 +1,5 @@ #============================================================================== -# Copyright (c) 2003-2007 Joel de Guzman +# Copyright (c) 2003-2011 Joel de Guzman # # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/acknowledgements.qbk b/doc/acknowledgements.qbk index fd66c3c5..61f7b7c0 100644 --- a/doc/acknowledgements.qbk +++ b/doc/acknowledgements.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/adapted.qbk b/doc/adapted.qbk index ea47a5d1..d0dabbae 100644 --- a/doc/adapted.qbk +++ b/doc/adapted.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software diff --git a/doc/algorithm.qbk b/doc/algorithm.qbk index e1346978..893883d2 100644 --- a/doc/algorithm.qbk +++ b/doc/algorithm.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software diff --git a/doc/changelog.qbk b/doc/changelog.qbk index 67a65d0e..98de599f 100644 --- a/doc/changelog.qbk +++ b/doc/changelog.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software @@ -12,10 +12,10 @@ This section summarizes significant changes to the Fusion library. * Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman) * Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman) -* Feb 15, 2007: Added functional module. (Tobias Schwinger) -* April 2, 2007: Added struct adapter. (Joel de Guzman) -* May 8, 2007: Added associative struct adapter. (Dan Marsden) -* Dec 20, 2007: Removed `boost::variant` support. After thorough +* Feb 15, 2011: Added functional module. (Tobias Schwinger) +* April 2, 2011: Added struct adapter. (Joel de Guzman) +* May 8, 2011: Added associative struct adapter. (Dan Marsden) +* Dec 20, 2011: Removed `boost::variant` support. After thorough investigation, I think now that the move to make variant a fusion sequence is rather quirky. A variant will always have a size==1 regardless of the number of types it can contain diff --git a/doc/container.qbk b/doc/container.qbk index 901417f0..d1a4c3a6 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/extension.qbk b/doc/extension.qbk index 7d132316..ae770bd0 100644 --- a/doc/extension.qbk +++ b/doc/extension.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/functional.qbk b/doc/functional.qbk index 120ae0d2..d587290b 100644 --- a/doc/functional.qbk +++ b/doc/functional.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/fusion.qbk b/doc/fusion.qbk index fd348d57..a4e1e0c5 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software @@ -8,9 +8,9 @@ ===============================================================================/] [library Fusion [quickbook 1.3] - [version 2.0] + [version 2.3] [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]] - [copyright 2001 2002 2003 2004 2005 2006 2007 Joel de Guzman, Dan Marsden, Tobias Schwinger] + [copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger] [purpose Statically Typed Heterogeneous Data Structures and Algorithms] [license Distributed under the Boost Software License, Version 1.0. diff --git a/doc/introduction.qbk b/doc/introduction.qbk index 066f5a33..48945b9f 100644 --- a/doc/introduction.qbk +++ b/doc/introduction.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/iterator.qbk b/doc/iterator.qbk index 2575f275..17025697 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/notes.qbk b/doc/notes.qbk index f8255733..bb4e343a 100644 --- a/doc/notes.qbk +++ b/doc/notes.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software diff --git a/doc/organization.qbk b/doc/organization.qbk index 8b81fbfc..df481115 100644 --- a/doc/organization.qbk +++ b/doc/organization.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/preface.qbk b/doc/preface.qbk index 5686642a..42be72dc 100644 --- a/doc/preface.qbk +++ b/doc/preface.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/quick_start.qbk b/doc/quick_start.qbk index c0d69f1e..0bd7c946 100644 --- a/doc/quick_start.qbk +++ b/doc/quick_start.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/references.qbk b/doc/references.qbk index 5b6c21a1..98e1fc3b 100644 --- a/doc/references.qbk +++ b/doc/references.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/sequence.qbk b/doc/sequence.qbk index e86156a5..6d0d1655 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/support.qbk b/doc/support.qbk index dae8d031..27cbded1 100644 --- a/doc/support.qbk +++ b/doc/support.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/tuple.qbk b/doc/tuple.qbk index 97a0aa46..d3ed713a 100644 --- a/doc/tuple.qbk +++ b/doc/tuple.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/view.qbk b/doc/view.qbk index 7c6899f1..328deb8e 100644 --- a/doc/view.qbk +++ b/doc/view.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From 24bca52c5ee72b05fb41751a09346c25ca051985 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 10:08:44 +0000 Subject: [PATCH 07/99] Wrong version. Should be 2.2. [SVN r74885] --- doc/fusion.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fusion.qbk b/doc/fusion.qbk index a4e1e0c5..afcfd976 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -8,7 +8,7 @@ ===============================================================================/] [library Fusion [quickbook 1.3] - [version 2.3] + [version 2.2] [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]] [copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger] [purpose Statically Typed Heterogeneous Data Structures and Algorithms] From fd82b51cecf41e33ba1e17d3ebf9b5450cf28135 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 10 Oct 2011 10:37:53 +0000 Subject: [PATCH 08/99] Wrong version. Should be 2.2 + fixed copyright notices and dates [SVN r74886] --- doc/acknowledgements.qbk | 3 +- doc/adapted.qbk | 123 ++++++++++++++++++++------------------- doc/algorithm.qbk | 3 +- doc/changelog.qbk | 19 ++++-- doc/container.qbk | 5 +- doc/extension.qbk | 3 +- doc/functional.qbk | 10 ++-- doc/fusion.qbk | 3 +- doc/introduction.qbk | 3 +- doc/iterator.qbk | 11 ++-- doc/notes.qbk | 11 ++-- doc/organization.qbk | 3 +- doc/preface.qbk | 3 +- doc/quick_start.qbk | 3 +- doc/references.qbk | 3 +- doc/sequence.qbk | 3 +- doc/support.qbk | 3 +- doc/tuple.qbk | 3 +- doc/view.qbk | 11 ++-- 19 files changed, 125 insertions(+), 101 deletions(-) diff --git a/doc/acknowledgements.qbk b/doc/acknowledgements.qbk index 61f7b7c0..da059955 100644 --- a/doc/acknowledgements.qbk +++ b/doc/acknowledgements.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/adapted.qbk b/doc/adapted.qbk index d0dabbae..47e538c5 100644 --- a/doc/adapted.qbk +++ b/doc/adapted.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software @@ -243,7 +244,7 @@ __random_access_sequence__. [heading Semantics] -The above macro generates the necessary code to adapt `struct_name` or an +The above macro generates the necessary code to adapt `struct_name` or an arbitrary specialization of `struct_name` as a model of __random_access_sequence__. The sequence `(template_param0)(template_param1)...` declares the names of @@ -286,9 +287,9 @@ namespace qualified name of the struct to be adapted. [section:adapt_struct_named BOOST_FUSION_ADAPT_STRUCT_NAMED] [heading Description] -BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are -macros that can be used to generate all the necessary boilerplate to make an -arbitrary struct a model of __random_access_sequence__. The given struct is +BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are +macros that can be used to generate all the necessary boilerplate to make an +arbitrary struct a model of __random_access_sequence__. The given struct is adapted using the given name. [heading Synopsis] @@ -311,7 +312,7 @@ adapted using the given name. [heading Semantics] The above macros generate the necessary code to adapt `struct_name` -as a model of __random_access_sequence__ while using `adapted_name` as the +as a model of __random_access_sequence__ while using `adapted_name` as the name of the adapted struct. The sequence `(namespace0)(namespace1)...` declares the namespace for `adapted_name`. It yields to a fully qualified name for `adapted_name` of @@ -426,7 +427,7 @@ __random_access_sequence__ and __associative_sequence__. [heading Semantics] -The above macro generates the necessary code to adapt `struct_name` or an +The above macro generates the necessary code to adapt `struct_name` or an arbitrary specialization of `struct_name` as a model of __random_access_sequence__ and __associative_sequence__. The sequence `(template_param0)(template_param1)...` declares the names of @@ -462,7 +463,7 @@ namespace qualified name of the struct to be adapted. struct name; struct age; } - + // Any instantiated demo::employee is now a Fusion sequence. // It is also an associative sequence with // keys keys::name and keys::age present. @@ -477,8 +478,8 @@ namespace qualified name of the struct to be adapted. [section:adapt_assoc_struct_named BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED] [heading Description] -BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS are -macros that can be used to generate all the necessary boilerplate to make an +BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS are +macros that can be used to generate all the necessary boilerplate to make an arbitrary struct a model of __random_access_sequence__ and __associative_sequence__. The given struct is adapted using the given name. @@ -538,7 +539,7 @@ namespace qualified name of the struct to be converted. struct name; struct age; } - + // boost::fusion::adapted::adapted_employee is now a Fusion sequence // referring to demo::employee BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( @@ -566,7 +567,7 @@ __random_access_sequence__. [heading Expression Semantics] The above macro generates the necessary code to adapt `type_name` -as a model of __random_access_sequence__. +as a model of __random_access_sequence__. The sequence of [^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])] quadruples declares the types, const types, get-expressions and set-expressions @@ -599,7 +600,7 @@ namespace qualified name of the class type to be adapted. #include #include - + [heading Example] namespace demo { @@ -608,41 +609,41 @@ namespace qualified name of the class type to be adapted. private: std::string name; int age; - + public: void set_name(std::string const& n) { name=n; } - + void set_age(int a) { age=a; } - + std::string const& get_name()const { return name; } - + int get_age()const { return age; } }; } - + BOOST_FUSION_ADAPT_ADT( demo::employee, (std::string const&, std::string const&, obj.get_name(), obj.set_name(val)) (int, int, obj.get_age(), obj.set_age(val))) - + demo::employee e; front(e)="Edward Norton"; back(e)=41; //Prints 'Edward Norton is 41 years old' std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; - + [heading See also] __adt_attribute_proxy__ @@ -669,7 +670,7 @@ __random_access_sequence__. The above macro generates the necessary code to adapt `type_name` or an arbitrary specialization of `type_name` -as a model of __random_access_sequence__. +as a model of __random_access_sequence__. The sequence `(template_param0)(template_param1)...` declares the names of the template type parameters used. The sequence `(specialization_param0)(specialization_param1)...` @@ -707,40 +708,40 @@ namespace qualified name of the template class type to be adapted. #include #include - + [heading Example] namespace demo - { + { template struct employee { private: Name name; Age age; - + public: void set_name(Name const& n) { name=n; } - + void set_age(Age const& a) { age=a; } - + Name const& get_name()const { return name; } - + Age const& get_age()const { return age; } }; } - + BOOST_FUSION_ADAPT_TPL_ADT( (Name)(Age), (demo::employee) (Name)(Age), @@ -752,7 +753,7 @@ namespace qualified name of the template class type to be adapted. boost::fusion::back(e)=41; //Prints 'Edward Norton is 41 years old' std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; - + [heading See also] __adt_attribute_proxy__ @@ -777,7 +778,7 @@ __random_access_sequence__ and __associative_sequence__. [heading Expression Semantics] The above macro generates the necessary code to adapt `type_name` -as a model of __random_access_sequence__ and __associative_sequence__. +as a model of __random_access_sequence__ and __associative_sequence__. The sequence of [^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])] 5-tuples declares the types, const types, get-expressions, set-expressions and key types @@ -799,7 +800,7 @@ The actual return type of fusion's intrinsic sequence access (meta-)functions when in invoked with (an instance of) `type_name` is a proxy type. This type is implicitly convertible to the attribute type via [^get_expr['N]] and forwards assignment to the underlying element via [^set_expr['N]]. -The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, +The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, __result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element is [^attribute_type['N]] with const-qualifier and reference removed. @@ -810,7 +811,7 @@ namespace qualified name of the class type to be adapted. #include #include - + [heading Example] namespace demo { @@ -819,47 +820,47 @@ namespace qualified name of the class type to be adapted. private: std::string name; int age; - + public: void set_name(std::string const& n) { name=n; } - + void set_age(int a) { age=a; } - + std::string const& get_name()const { return name; } - + int get_age()const { return age; } }; } - + namespace keys { struct name; struct age; } - + BOOST_FUSION_ADAPT_ASSOC_ADT( demo::employee, (std::string const&, std::string const&, obj.get_name(), obj.set_name(val), keys::name) (int, int, obj.get_age(), obj.set_age(val), keys::age)) - + demo::employee e; at_key(e)="Edward Norton"; at_key(e)=41; //Prints 'Edward Norton is 41 years old' std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; - + [heading See also] __adt_attribute_proxy__ @@ -886,7 +887,7 @@ __random_access_sequence__ and __associative_sequence__. The above macro generates the necessary code to adapt `type_name` or an arbitrary specialization of `type_name` -as a model of __random_access_sequence__ and __associative_sequence__. +as a model of __random_access_sequence__ and __associative_sequence__. The sequence `(template_param0)(template_param1)...` declares the names of the template type parameters used. The sequence `(specialization_param0)(specialization_param1)...` @@ -913,7 +914,7 @@ The actual return type of fusion's intrinsic sequence access (meta-)functions when in invoked with (an instance of) `type_name` is a proxy type. This type is implicitly convertible to the attribute type via [^get_expr['N]] and forwards assignment to the underlying element via [^set_expr['N]]. -The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, +The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, __result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element is [^attribute_type['N]] with const-qualifier and reference removed. @@ -924,7 +925,7 @@ namespace qualified name of the template class type to be adapted. #include #include - + [heading Example] namespace demo { @@ -934,48 +935,48 @@ namespace qualified name of the template class type to be adapted. private: Name name; Age age; - + public: void set_name(Name const& n) { name=n; } - + void set_age(Age const& a) { age=a; } - + Name const& get_name()const { return name; } - + Age const& get_age()const { return age; } }; } - + namespace keys { struct name; struct age; } - + BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( (Name)(Age), (demo::employee) (Name)(Age), (Name const&, Name const&, obj.get_name(), obj.set_name(val), keys::name) (Age const&, Age const&, obj.get_age(), obj.set_age(val), keys::age)) - + demo::employee e; at_key(e)="Edward Norton"; at_key(e)=41; //Prints 'Edward Norton is 41 years old' std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; - + [heading See also] __adt_attribute_proxy__ @@ -1027,14 +1028,14 @@ defined in __random_access_sequence__. [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] - [[`str.member_nameN`] [Access of struct member `member_nameN`]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] ] [heading Header] #include #include - + [heading Example] // demo::employee is a Fusion sequence @@ -1096,14 +1097,14 @@ defined in __random_access_sequence__. [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] - [[`str.member_nameN`] [Access of struct member `member_nameN`]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] ] [heading Header] #include #include - + [heading Example] // Any instantiated demo::employee is a Fusion sequence @@ -1161,14 +1162,14 @@ defined in __random_access_sequence__ and __associative_sequence__. [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] - [[`str.member_nameN`] [Access of struct member `member_nameN`]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] ] [heading Header] #include #include - + [heading Example] namespace keys @@ -1176,7 +1177,7 @@ defined in __random_access_sequence__ and __associative_sequence__. struct name; struct age; } - + // demo::employee is a Fusion sequence BOOST_FUSION_DEFINE_ASSOC_STRUCT( (demo), employee, @@ -1237,14 +1238,14 @@ defined in __random_access_sequence__ and __associative_sequence__. [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] - [[`str.member_nameN`] [Access of struct member `member_nameN`]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] ] [heading Header] #include #include - + [heading Example] namespace keys @@ -1252,7 +1253,7 @@ defined in __random_access_sequence__ and __associative_sequence__. struct name; struct age; } - + // Any instantiated demo::employee is a Fusion sequence BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( (Name)(Age), (demo), employee, diff --git a/doc/algorithm.qbk b/doc/algorithm.qbk index 893883d2..fd136f6d 100644 --- a/doc/algorithm.qbk +++ b/doc/algorithm.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software diff --git a/doc/changelog.qbk b/doc/changelog.qbk index 98de599f..9bccc0c0 100644 --- a/doc/changelog.qbk +++ b/doc/changelog.qbk @@ -1,5 +1,7 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2006 Tobias Schwinger Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software @@ -12,10 +14,10 @@ This section summarizes significant changes to the Fusion library. * Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman) * Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman) -* Feb 15, 2011: Added functional module. (Tobias Schwinger) -* April 2, 2011: Added struct adapter. (Joel de Guzman) -* May 8, 2011: Added associative struct adapter. (Dan Marsden) -* Dec 20, 2011: Removed `boost::variant` support. After thorough +* Feb 15, 2007: Added functional module. (Tobias Schwinger) +* April 2, 2007: Added struct adapter. (Joel de Guzman) +* May 8, 2007: Added associative struct adapter. (Dan Marsden) +* Dec 20, 2007: Removed `boost::variant` support. After thorough investigation, I think now that the move to make variant a fusion sequence is rather quirky. A variant will always have a size==1 regardless of the number of types it can contain @@ -37,6 +39,11 @@ This section summarizes significant changes to the Fusion library. (Christopher Schmidt) * October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__, __adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman, - Hartmut Kaiser and Christopher Schmidt) + Hartmut Kaiser and Christopher Schmidt) +* August 29, 2011: Added support for segmented sequences and iterators (Eric Niebler) +* September 16, 2011: Added preprocessed files (using wave) to speed up + compilation (Joel de Guzman) +* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman) +* October 10, 2011: Made map random access (Brandon Kohn) [endsect] diff --git a/doc/container.qbk b/doc/container.qbk index d1a4c3a6..fe55beda 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -681,7 +682,7 @@ Create a __map__ from one or more key/data pairs. , typename T0, typename T1,... typename TN> typename __result_of_make_map__::type make_map(T0 const& x0, T1 const& x1... TN const& xN); - + The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that defaults to `10`. You may define the preprocessor constant diff --git a/doc/extension.qbk b/doc/extension.qbk index ae770bd0..354bc13e 100644 --- a/doc/extension.qbk +++ b/doc/extension.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/functional.qbk b/doc/functional.qbk index d587290b..19205527 100644 --- a/doc/functional.qbk +++ b/doc/functional.qbk @@ -1,5 +1,5 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2006 Tobias Schwinger Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -66,9 +66,9 @@ function objects to accept arbitrary calls. In other words, an unary function object can be implemented instead of (maybe heavily overloaded) function templates or function call operators. -The library provides both a strictly typed and a generic variant for this +The library provides both a strictly typed and a generic variant for this transformation. The latter should be used in combination with -__boost_func_forward__ to attack __the_forwarding_problem__. +__boost_func_forward__ to attack __the_forwarding_problem__. Both variants have a corresponding generator function template that returns an adapter instance for the given argument. @@ -546,7 +546,7 @@ Returns the result type of __invoke_function_object__. [heading Macros] -The following macros can be defined to change the maximum arity. +The following macros can be defined to change the maximum arity. The default is 6. * BOOST_FUSION_INVOKE_MAX_ARITY @@ -1060,7 +1060,7 @@ signature is optimized automatically to avoid by-value parameters.] [heading Macros] -The following macros can be defined to change the maximum arity. +The following macros can be defined to change the maximum arity. The value used for these macros must not exceed `FUSION_MAX_VECTOR_SIZE`. The default is 6. diff --git a/doc/fusion.qbk b/doc/fusion.qbk index afcfd976..ce0141b8 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software diff --git a/doc/introduction.qbk b/doc/introduction.qbk index 48945b9f..f8979bfc 100644 --- a/doc/introduction.qbk +++ b/doc/introduction.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/iterator.qbk b/doc/iterator.qbk index 17025697..8efecda9 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -994,9 +995,9 @@ Returns the key type associated with the element referenced by an associative it [heading Example] typedef __map__<__pair__ > vec; typedef __result_of_begin__::type first; - + BOOST_MPL_ASSERT((boost::is_same<__result_of_key_of__::type, float>)); - + [endsect] [section value_of_data] @@ -1033,9 +1034,9 @@ Returns the type of the data property associated with the element referenced by [heading Example] typedef __map__<__pair__ > vec; typedef __result_of_begin__::type first; - + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of_data__::type, int>)); - + [endsect] [section deref_data] diff --git a/doc/notes.qbk b/doc/notes.qbk index bb4e343a..85ccd98d 100644 --- a/doc/notes.qbk +++ b/doc/notes.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Copyright (C) 2010 Christopher Schmidt Use, modification and distribution is subject to the Boost Software @@ -167,7 +168,7 @@ and __deref_data__) is a proxy type, an instance of has three template arguments: namespace boost { namespace fusion { namespace extension - { + { template< typename Type , int Index @@ -175,14 +176,14 @@ has three template arguments: > struct adt_attribute_proxy; }}} - + When adapting a class type, `adt_attribute_proxy` is specialized for every element of the adapted sequence, with `Type` being the class type that is adapted, `Index` the 0-based indices of the elements, and `Const` both `true` and `false`. The return type of fusion's intrinsic sequence access functions for the ['N]th element of an adapted class type `type_name` is [^adt_attribute_proxy], with [^['Const]] being `true` -for constant instances of `type_name` and `false` for non-constant ones. +for constant instances of `type_name` and `false` for non-constant ones. [variablelist Notation [[`type_name`] @@ -204,7 +205,7 @@ for constant instances of `type_name` and `false` for non-constant ones. ] [*Expression Semantics] - + [table [[Expression] [Semantics]] [[[^proxy_type['N](inst)]] [Creates an instance of [^proxy_type['N]] with underlying object `inst`]] diff --git a/doc/organization.qbk b/doc/organization.qbk index df481115..e3dd7fb4 100644 --- a/doc/organization.qbk +++ b/doc/organization.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/preface.qbk b/doc/preface.qbk index 42be72dc..cdf0114f 100644 --- a/doc/preface.qbk +++ b/doc/preface.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/quick_start.qbk b/doc/quick_start.qbk index 0bd7c946..e6e6c3c1 100644 --- a/doc/quick_start.qbk +++ b/doc/quick_start.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/references.qbk b/doc/references.qbk index 98e1fc3b..d0d63019 100644 --- a/doc/references.qbk +++ b/doc/references.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/sequence.qbk b/doc/sequence.qbk index 6d0d1655..f76eee5a 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/support.qbk b/doc/support.qbk index 27cbded1..4a040015 100644 --- a/doc/support.qbk +++ b/doc/support.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/tuple.qbk b/doc/tuple.qbk index d3ed713a..3be81bbe 100644 --- a/doc/tuple.qbk +++ b/doc/tuple.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/view.qbk b/doc/view.qbk index 328deb8e..62539830 100644 --- a/doc/view.qbk +++ b/doc/view.qbk @@ -1,5 +1,6 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -482,7 +483,7 @@ defined in the implemented models. [heading Description] -`nview` presents a view which iterates over a given __sequence__ in a specified order. +`nview` presents a view which iterates over a given __sequence__ in a specified order. An `nview` is constructed from an arbitrary __sequence__ and a list of indicies specifying the elements to iterate over. @@ -506,15 +507,15 @@ the elements to iterate over. [[Parameter] [Description] [Default]] [[`Sequence`] [An arbitrary Fusion __forward_sequence__] []] - [[`Indicies`] [A `mpl::vector_c` holding the indicies defining + [[`Indicies`] [A `mpl::vector_c` holding the indicies defining the required iteration order.] []] - [[`I1`, `I2`, `I3`...] [A list of integers specifying the required + [[`I1`, `I2`, `I3`...] [A list of integers specifying the required iteration order.] [`INT_MAX` for `I2`, `I3`...]] ] [heading Model of] -* __random_access_sequence__ (see __traversal_concept__) +* __random_access_sequence__ (see __traversal_concept__) [variablelist Notation [[`NV`] [A `nview` type]] From 480183059e7be08f7d6249b99d29a7db91d3222f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 13 Oct 2011 00:23:40 +0000 Subject: [PATCH 09/99] + Fixes Ticket #6016 using a two-level specialization such that specialization is preferred over SFINAE. + Removes tag_of_fallback. It's not needed anymore. The proper way is to specialize tag_of. [SVN r74934] --- include/boost/fusion/support/tag_of.hpp | 31 +++++++++++---------- include/boost/fusion/support/tag_of_fwd.hpp | 3 -- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/include/boost/fusion/support/tag_of.hpp b/include/boost/fusion/support/tag_of.hpp index 1c5a26e5..a3fef3ba 100644 --- a/include/boost/fusion/support/tag_of.hpp +++ b/include/boost/fusion/support/tag_of.hpp @@ -46,28 +46,29 @@ namespace boost { namespace fusion namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag) + + template + struct tag_of_impl + : mpl::if_, + mpl::identity, + mpl::identity >::type + {}; + + template + struct tag_of_impl< + Sequence + , typename boost::enable_if >::type> + { + typedef typename Sequence::fusion_tag type; + }; } namespace traits { - template - struct tag_of_fallback - { - typedef non_fusion_tag type; - }; - template struct tag_of - : mpl::if_< fusion::detail::is_mpl_sequence, - mpl::identity, - tag_of_fallback >::type + : boost::fusion::detail::tag_of_impl {}; - - template - struct tag_of >::type> - { - typedef typename Sequence::fusion_tag type; - }; } namespace detail diff --git a/include/boost/fusion/support/tag_of_fwd.hpp b/include/boost/fusion/support/tag_of_fwd.hpp index dfc0e01c..ba434d93 100644 --- a/include/boost/fusion/support/tag_of_fwd.hpp +++ b/include/boost/fusion/support/tag_of_fwd.hpp @@ -12,9 +12,6 @@ namespace boost { namespace fusion { namespace traits { - template - struct tag_of_fallback; - template struct tag_of; } From c2052a3c0c913bd6865107330667ce873af1d7d9 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 4 Nov 2011 20:37:33 +0000 Subject: [PATCH 10/99] Fix Ticket #6067 [SVN r75318] --- .../detail/segmented_iterator_range.hpp | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index d63c2b32..e5f5ed0b 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -29,11 +29,21 @@ // - All other ranges point to ranges // - The front of each range in the stack (besides the // topmost) is the range above it - + namespace boost { namespace fusion { template struct iterator_range; + + namespace result_of + { + template + struct push_back; + } + + template + typename result_of::push_back::type + push_back(Sequence const& seq, T const& x); }} namespace boost { namespace fusion { namespace detail @@ -117,7 +127,7 @@ namespace boost { namespace fusion { namespace detail segment_sequence< typename result_of::push_front< rest_type const - , typename recurse::type + , typename recurse::type >::type > type; @@ -184,7 +194,7 @@ namespace boost { namespace fusion { namespace detail { return stack.cdr; } - }; + }; //auto make_segment_sequence_back(stack_end) //{ @@ -260,7 +270,7 @@ namespace boost { namespace fusion { namespace detail segment_sequence< typename result_of::push_back< rest_type const - , typename recurse::type + , typename recurse::type >::type > type; @@ -328,7 +338,7 @@ namespace boost { namespace fusion { namespace detail return stack.cdr; } }; - + //auto make_segmented_range_reduce(stack_begin, stack_end) //{ // if (size(stack_begin) == 1 && size(stack_end) == 1) @@ -373,7 +383,7 @@ namespace boost { namespace fusion { namespace detail template < typename StackBegin , typename StackEnd - , bool SameSegment = + , bool SameSegment = result_of::equal_to< typename StackBegin::car_type::begin_type , typename StackEnd::car_type::begin_type From bbf10066bcacad633d1233ac8152098151803dfd Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 7 Nov 2011 22:07:05 +0000 Subject: [PATCH 11/99] C++11 patches by Michel Morin [SVN r75394] --- include/boost/fusion/support/deduce_sequence.hpp | 8 ++++++++ .../fusion/view/detail/strictest_traversal.hpp | 8 ++++++++ include/boost/fusion/view/nview/nview.hpp | 11 +++++++++++ .../fusion/view/zip_view/detail/end_impl.hpp | 2 +- .../view/zip_view/detail/value_at_impl.hpp | 8 ++++++++ .../view/zip_view/detail/value_of_impl.hpp | 8 ++++++++ include/boost/fusion/view/zip_view/zip_view.hpp | 16 ++++++++++++++++ test/functional/invoke.cpp | 2 ++ test/functional/invoke_function_object.cpp | 2 ++ test/functional/unfused.cpp | 2 +- test/functional/unfused_typed.cpp | 2 +- 11 files changed, 66 insertions(+), 3 deletions(-) diff --git a/include/boost/fusion/support/deduce_sequence.hpp b/include/boost/fusion/support/deduce_sequence.hpp index 77631b79..ce02a3cd 100644 --- a/include/boost/fusion/support/deduce_sequence.hpp +++ b/include/boost/fusion/support/deduce_sequence.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace traits @@ -29,6 +30,13 @@ namespace boost { namespace fusion { namespace traits struct result< Self(T) > : fusion::traits::deduce { }; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result< deducer(T) >::type + operator()(T&&) const; +#endif }; } diff --git a/include/boost/fusion/view/detail/strictest_traversal.hpp b/include/boost/fusion/view/detail/strictest_traversal.hpp index 39a389c3..7b7c9760 100644 --- a/include/boost/fusion/view/detail/strictest_traversal.hpp +++ b/include/boost/fusion/view/detail/strictest_traversal.hpp @@ -8,6 +8,7 @@ #if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101) #define FUSION_STRICTEST_TRAVERSAL_20060123_2101 +#include #include #include #include @@ -53,6 +54,13 @@ namespace boost { namespace fusion typedef typename stricter_traversal::type type; }; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result::type + operator()(StrictestSoFar&&, Next&&) const; +#endif }; template diff --git a/include/boost/fusion/view/nview/nview.hpp b/include/boost/fusion/view/nview/nview.hpp index 02422e0b..2355b688 100644 --- a/include/boost/fusion/view/nview/nview.hpp +++ b/include/boost/fusion/view/nview/nview.hpp @@ -23,6 +23,8 @@ #include #include +#include + namespace boost { namespace fusion { namespace detail @@ -35,12 +37,21 @@ namespace boost { namespace fusion template struct result : add_reference {}; +#ifdef BOOST_NO_RVALUE_REFERENCES template typename add_reference::type operator()(T& x) const { return x; } +#else + template + typename result::type + operator()(T&& x) const + { + return x; + } +#endif }; struct addconstref diff --git a/include/boost/fusion/view/zip_view/detail/end_impl.hpp b/include/boost/fusion/view/zip_view/detail/end_impl.hpp index b58854e3..6423a88f 100644 --- a/include/boost/fusion/view/zip_view/detail/end_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/end_impl.hpp @@ -62,7 +62,7 @@ namespace boost { namespace fusion { template typename result::type - operator()(Seq const& seq) + operator()(Seq const& seq) const { return fusion::advance(fusion::begin(seq)); } diff --git a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp index 93f0979b..13e0274f 100644 --- a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace boost { namespace fusion { @@ -35,6 +36,13 @@ namespace boost { namespace fusion { mpl::identity, result_of::value_at::type, N> > {}; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result::type + operator()(Seq&&) const; +#endif }; } diff --git a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp index 45b7b962..5571155e 100644 --- a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace boost { namespace fusion { @@ -34,6 +35,13 @@ namespace boost { namespace fusion mpl::identity, result_of::value_of > {}; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result::type + operator()(It&&) const; +#endif }; } diff --git a/include/boost/fusion/view/zip_view/zip_view.hpp b/include/boost/fusion/view/zip_view/zip_view.hpp index 6258711c..e9a0222d 100644 --- a/include/boost/fusion/view/zip_view/zip_view.hpp +++ b/include/boost/fusion/view/zip_view/zip_view.hpp @@ -37,6 +37,8 @@ #include #include +#include + namespace boost { namespace fusion { namespace detail @@ -64,6 +66,13 @@ namespace boost { namespace fusion { result_of::size, mpl::int_ >::type type; }; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result::type + operator()(Seq&&) const; +#endif }; struct poly_min @@ -78,6 +87,13 @@ namespace boost { namespace fusion { typedef typename remove_reference::type rhs; typedef typename mpl::min::type type; }; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template + typename result::type + operator()(Lhs&&, Rhs&&) const; +#endif }; template diff --git a/test/functional/invoke.cpp b/test/functional/invoke.cpp index 52740eec..f326cbd8 100644 --- a/test/functional/invoke.cpp +++ b/test/functional/invoke.cpp @@ -72,6 +72,8 @@ struct fobj int operator()(int i, object &, object_nc &) { return 10 + i; } int operator()(int i, object &, object_nc &) const { return 11 + i; } + int operator()(int i, object const &, object_nc &); + int operator()(int i, object const &, object_nc &) const; }; struct nullary_fobj diff --git a/test/functional/invoke_function_object.cpp b/test/functional/invoke_function_object.cpp index 31357aa8..7cbe6e59 100644 --- a/test/functional/invoke_function_object.cpp +++ b/test/functional/invoke_function_object.cpp @@ -75,6 +75,8 @@ struct fobj int operator()(int i, object &, object_nc &) { return 10 + i; } int operator()(int i, object &, object_nc &) const { return 11 + i; } + int operator()(int i, object const &, object_nc &); + int operator()(int i, object const &, object_nc &) const; }; struct nullary_fobj diff --git a/test/functional/unfused.cpp b/test/functional/unfused.cpp index 27a242a6..bde9b95b 100644 --- a/test/functional/unfused.cpp +++ b/test/functional/unfused.cpp @@ -71,7 +71,7 @@ void result_type_tests() typedef fusion::unfused< test_func<> > t; BOOST_TEST(( is_same< boost::result_of< t () >::type, long >::value )); - BOOST_TEST(( is_same< boost::result_of< t (int) >::type, long >::value )); + BOOST_TEST(( is_same< boost::result_of< t (int &) >::type, long >::value )); } int main() diff --git a/test/functional/unfused_typed.cpp b/test/functional/unfused_typed.cpp index 85783c86..93c35b6d 100644 --- a/test/functional/unfused_typed.cpp +++ b/test/functional/unfused_typed.cpp @@ -85,7 +85,7 @@ void result_type_tests() typedef fusion::unfused_typed< test_func<>, types0 > t0; BOOST_TEST(( is_same< boost::result_of< t0 () >::type, long >::value )); typedef fusion::unfused_typed< test_func<>, types1 > t1; - BOOST_TEST(( is_same< boost::result_of< t1 (int) >::type, long >::value )); + BOOST_TEST(( is_same< boost::result_of< t1 (long &) >::type, long >::value )); } #if defined(BOOST_MSVC) && BOOST_MSVC < 1400 From 0a520f6021def0ab6e7b5b9d1bba183906e3d257 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 20 Nov 2011 10:59:09 +0000 Subject: [PATCH 12/99] fix problem where sizeof(int) != sizeof(long) [SVN r75563] --- include/boost/fusion/view/nview/detail/nview_impl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/view/nview/detail/nview_impl.hpp b/include/boost/fusion/view/nview/detail/nview_impl.hpp index 03aa49f4..555c34ea 100644 --- a/include/boost/fusion/view/nview/detail/nview_impl.hpp +++ b/include/boost/fusion/view/nview/detail/nview_impl.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2009 Hartmut Kaiser - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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) ==============================================================================*/ @@ -27,7 +27,7 @@ namespace boost { namespace fusion { namespace result_of { template + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)> struct as_nview { typedef mpl::vector_c< From 48e4118768caba348954eb8ba014f452c44d5624 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 21 Nov 2011 14:43:19 +0000 Subject: [PATCH 13/99] Fixes for MSVC workarounds from Freundlich: http://codepad.org/wRelwDJt [SVN r75595] --- .../vector/detail/preprocessed/vvector10.hpp | 3 +- .../vector/detail/preprocessed/vvector20.hpp | 3 +- .../vector/detail/preprocessed/vvector30.hpp | 3 +- .../vector/detail/preprocessed/vvector40.hpp | 3 +- .../vector/detail/preprocessed/vvector50.hpp | 3 +- .../boost/fusion/container/vector/vector.hpp | 54 ++++++++++++------- 6 files changed, 44 insertions(+), 25 deletions(-) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp index a566278a..8e6f1f68 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp @@ -36,7 +36,7 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template vector(Sequence const& rhs) - : vec(rhs) {} + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} @@ -116,6 +116,7 @@ namespace boost { namespace fusion return vec.at_impl(mpl::int_()); } private: + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp index 378ea978..bc04fefe 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp @@ -36,7 +36,7 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template vector(Sequence const& rhs) - : vec(rhs) {} + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} @@ -136,6 +136,7 @@ namespace boost { namespace fusion return vec.at_impl(mpl::int_()); } private: + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp index f49d3ef2..0841920a 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp @@ -36,7 +36,7 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template vector(Sequence const& rhs) - : vec(rhs) {} + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} @@ -156,6 +156,7 @@ namespace boost { namespace fusion return vec.at_impl(mpl::int_()); } private: + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp index c683cba6..11d9cc7d 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp @@ -36,7 +36,7 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template vector(Sequence const& rhs) - : vec(rhs) {} + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} @@ -176,6 +176,7 @@ namespace boost { namespace fusion return vec.at_impl(mpl::int_()); } private: + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp index 316f9d27..1ac6c6f4 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp @@ -36,7 +36,7 @@ namespace boost { namespace fusion : vec(rhs.vec) {} template vector(Sequence const& rhs) - : vec(rhs) {} + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} @@ -196,6 +196,7 @@ namespace boost { namespace fusion return vec.at_impl(mpl::int_()); } private: + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 5bb0b6ab..6563bc93 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -17,6 +17,38 @@ #include #include +#if !defined(__WAVE__) + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) + +#define BOOST_FUSION_VECTOR_COPY_INIT() \ + ctor_helper(rhs, is_base_of()) \ + +#define BOOST_FUSION_VECTOR_CTOR_HELPER() \ + static vector_n const& \ + ctor_helper(vector const& rhs, mpl::true_) \ + { \ + return rhs.vec; \ + } \ + \ + template \ + static T const& \ + ctor_helper(T const& rhs, mpl::false_) \ + { \ + return rhs; \ + } + +#else + +#define BOOST_FUSION_VECTOR_COPY_INIT() \ + rhs \ + +#define BOOST_FUSION_VECTOR_CTOR_HELPER() + +#endif + +#endif // !defined(__WAVE__) + #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #include #else @@ -76,11 +108,7 @@ namespace boost { namespace fusion template vector(Sequence const& rhs) -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) - : vec(ctor_helper(rhs, is_base_of())) {} -#else - : vec(rhs) {} -#endif + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} // Expand a couple of forwarding constructors for arguments // of type (T0), (T0, T1), (T0, T1, T2) etc. Example: @@ -149,21 +177,7 @@ namespace boost { namespace fusion private: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) - static vector_n const& - ctor_helper(vector const& rhs, mpl::true_) - { - return rhs.vec; - } - - template - static T const& - ctor_helper(T const& rhs, mpl::false_) - { - return rhs; - } -#endif - + BOOST_FUSION_VECTOR_CTOR_HELPER() vector_n vec; }; }} From a25a7092d834b9e5be261fe62e57fb9a92692e84 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 16 Dec 2011 00:14:49 +0000 Subject: [PATCH 14/99] Patches from Tim Blechmann [SVN r75976] --- include/boost/fusion/container/list/cons.hpp | 4 ++-- .../vector/detail/preprocessed/vector10.hpp | 22 +++++++++---------- .../vector/detail/preprocessed/vector20.hpp | 20 ++++++++--------- .../vector/detail/preprocessed/vector30.hpp | 20 ++++++++--------- .../vector/detail/preprocessed/vector40.hpp | 20 ++++++++--------- .../vector/detail/preprocessed/vector50.hpp | 20 ++++++++--------- .../container/vector/detail/vector_n.hpp | 4 ++-- include/boost/fusion/iterator/equal_to.hpp | 4 ++-- .../fusion/sequence/comparison/equal_to.hpp | 2 +- .../fusion/sequence/comparison/greater.hpp | 2 +- .../sequence/comparison/greater_equal.hpp | 2 +- .../boost/fusion/sequence/comparison/less.hpp | 2 +- .../fusion/sequence/comparison/less_equal.hpp | 2 +- .../sequence/comparison/not_equal_to.hpp | 2 +- include/boost/fusion/sequence/io/in.hpp | 2 +- include/boost/fusion/sequence/io/out.hpp | 2 +- 16 files changed, 65 insertions(+), 65 deletions(-) diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index e434d5c7..666b5367 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -88,7 +88,7 @@ namespace boost { namespace fusion template cons( Sequence const& seq - , typename disable_if< + , typename boost::disable_if< mpl::or_< is_convertible // use copy ctor instead , is_convertible // use copy to car instead @@ -119,7 +119,7 @@ namespace boost { namespace fusion } template - typename disable_if, cons&>::type + typename boost::disable_if, cons&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type Iterator; diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp index 841eae19..d6258f60 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp @@ -61,7 +61,7 @@ namespace boost { namespace fusion template vector1( Sequence const& seq - , typename disable_if >::type* = 0 + , typename boost::disable_if >::type* = 0 ) : base_type(base_type::init_from_sequence(seq)) {} template @@ -72,7 +72,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -157,7 +157,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -242,7 +242,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -327,7 +327,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -412,7 +412,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -497,7 +497,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -582,7 +582,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -667,7 +667,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -752,7 +752,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -837,7 +837,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp index 94b82e20..a409b2e7 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp @@ -73,7 +73,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -158,7 +158,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -243,7 +243,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -328,7 +328,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -413,7 +413,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -498,7 +498,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -583,7 +583,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -668,7 +668,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -753,7 +753,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -838,7 +838,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp index 78ab3737..032ff9d2 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp @@ -73,7 +73,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -158,7 +158,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -243,7 +243,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -328,7 +328,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -413,7 +413,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -498,7 +498,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -583,7 +583,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -668,7 +668,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -753,7 +753,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -838,7 +838,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp index fb42550b..1b5fa58d 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp @@ -73,7 +73,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -158,7 +158,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -243,7 +243,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -328,7 +328,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -413,7 +413,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -498,7 +498,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -583,7 +583,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -668,7 +668,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -753,7 +753,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -838,7 +838,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp index 82f26096..ba6c1771 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp @@ -73,7 +73,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -158,7 +158,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -243,7 +243,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -328,7 +328,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -413,7 +413,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -498,7 +498,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -583,7 +583,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -668,7 +668,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -753,7 +753,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; @@ -838,7 +838,7 @@ namespace boost { namespace fusion return *this; } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 274c33e8..431774b3 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -104,7 +104,7 @@ BOOST_PP_CAT(vector, N)( Sequence const& seq #if (N == 1) - , typename disable_if >::type* /*dummy*/ = 0 + , typename boost::disable_if >::type* /*dummy*/ = 0 #endif ) : base_type(base_type::init_from_sequence(seq)) {} @@ -118,7 +118,7 @@ } template - typename disable_if, this_type&>::type + typename boost::disable_if, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin::type I0; diff --git a/include/boost/fusion/iterator/equal_to.hpp b/include/boost/fusion/iterator/equal_to.hpp index c15d870a..33478377 100644 --- a/include/boost/fusion/iterator/equal_to.hpp +++ b/include/boost/fusion/iterator/equal_to.hpp @@ -74,7 +74,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< mpl::and_, is_fusion_iterator > , bool >::type @@ -85,7 +85,7 @@ namespace boost { namespace fusion template inline typename - enable_if< + boost::enable_if< mpl::and_, is_fusion_iterator > , bool >::type diff --git a/include/boost/fusion/sequence/comparison/equal_to.hpp b/include/boost/fusion/sequence/comparison/equal_to.hpp index ad3ba585..9c4e0435 100644 --- a/include/boost/fusion/sequence/comparison/equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/equal_to.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< traits::enable_equality , bool >::type diff --git a/include/boost/fusion/sequence/comparison/greater.hpp b/include/boost/fusion/sequence/comparison/greater.hpp index f672a48e..077138d8 100644 --- a/include/boost/fusion/sequence/comparison/greater.hpp +++ b/include/boost/fusion/sequence/comparison/greater.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< traits::enable_comparison , bool >::type diff --git a/include/boost/fusion/sequence/comparison/greater_equal.hpp b/include/boost/fusion/sequence/comparison/greater_equal.hpp index 753deb4d..90175bc7 100644 --- a/include/boost/fusion/sequence/comparison/greater_equal.hpp +++ b/include/boost/fusion/sequence/comparison/greater_equal.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< traits::enable_comparison , bool >::type diff --git a/include/boost/fusion/sequence/comparison/less.hpp b/include/boost/fusion/sequence/comparison/less.hpp index 82383f77..944cdcf6 100644 --- a/include/boost/fusion/sequence/comparison/less.hpp +++ b/include/boost/fusion/sequence/comparison/less.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< traits::enable_comparison , bool >::type diff --git a/include/boost/fusion/sequence/comparison/less_equal.hpp b/include/boost/fusion/sequence/comparison/less_equal.hpp index 890fb99c..0e5d23a5 100644 --- a/include/boost/fusion/sequence/comparison/less_equal.hpp +++ b/include/boost/fusion/sequence/comparison/less_equal.hpp @@ -65,7 +65,7 @@ namespace boost { namespace fusion template inline typename - enable_if< + boost::enable_if< traits::enable_comparison , bool >::type diff --git a/include/boost/fusion/sequence/comparison/not_equal_to.hpp b/include/boost/fusion/sequence/comparison/not_equal_to.hpp index efc9b537..14ef25df 100644 --- a/include/boost/fusion/sequence/comparison/not_equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/not_equal_to.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< traits::enable_equality , bool >::type diff --git a/include/boost/fusion/sequence/io/in.hpp b/include/boost/fusion/sequence/io/in.hpp index da4e5a5c..73a1fffb 100644 --- a/include/boost/fusion/sequence/io/in.hpp +++ b/include/boost/fusion/sequence/io/in.hpp @@ -27,7 +27,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< fusion::traits::is_sequence , std::istream& >::type diff --git a/include/boost/fusion/sequence/io/out.hpp b/include/boost/fusion/sequence/io/out.hpp index fc7fa1af..988a3985 100644 --- a/include/boost/fusion/sequence/io/out.hpp +++ b/include/boost/fusion/sequence/io/out.hpp @@ -29,7 +29,7 @@ namespace boost { namespace fusion { template inline typename - enable_if< + boost::enable_if< fusion::traits::is_sequence , std::ostream& >::type From 1c51ad943ac66dbcb017ccbd4e19f87db25d82e1 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 31 Dec 2011 05:48:27 +0000 Subject: [PATCH 15/99] Fix for ticket #6338 [SVN r76238] --- .../iterator_range/detail/segmented_iterator_range.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index e5f5ed0b..489d9553 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -39,11 +39,18 @@ namespace boost { namespace fusion { template struct push_back; + + template + struct push_front; } template typename result_of::push_back::type push_back(Sequence const& seq, T const& x); + + template + typename result_of::push_front::type + push_front(Sequence const& seq, T const& x); }} namespace boost { namespace fusion { namespace detail From 38cd16639de01e6949363e4ba0750bec01f4778a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 10 Jan 2012 02:03:43 +0000 Subject: [PATCH 16/99] Fixes Ticket #6372 [SVN r76395] --- include/boost/fusion/view/iterator_range/detail/at_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/fusion/view/iterator_range/detail/at_impl.hpp b/include/boost/fusion/view/iterator_range/detail/at_impl.hpp index 5f882aaa..1b425231 100644 --- a/include/boost/fusion/view/iterator_range/detail/at_impl.hpp +++ b/include/boost/fusion/view/iterator_range/detail/at_impl.hpp @@ -33,7 +33,7 @@ namespace boost { namespace fusion static type call(Seq& s) { - return * advance(s.first); + return * fusion::advance(s.first); } }; }; From df0fbd1d9df1b8f7b2a0dd71d871a53771bd6dd5 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 25 Feb 2012 01:09:58 +0000 Subject: [PATCH 17/99] typo fix [SVN r77114] --- doc/container.qbk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index fe55beda..f8a13e03 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1039,8 +1039,8 @@ rules for __element_conversion__. [heading Header] - #include - #include + #include + #include [heading Example] From b6142f16133b21ee0c5e9c8ec48646f2654e74b4 Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Tue, 20 Mar 2012 02:12:55 +0000 Subject: [PATCH 18/99] Add newlines at end of file to avoid warnings like this: boost/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file [SVN r77424] --- include/boost/fusion/tuple.hpp | 1 + include/boost/fusion/tuple/detail/preprocessed/tuple.hpp | 3 ++- include/boost/fusion/tuple/tuple.hpp | 1 + include/boost/fusion/tuple/tuple_fwd.hpp | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/tuple.hpp b/include/boost/fusion/tuple.hpp index 3a4e7d01..1191c5c4 100644 --- a/include/boost/fusion/tuple.hpp +++ b/include/boost/fusion/tuple.hpp @@ -13,3 +13,4 @@ #include #endif + diff --git a/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp b/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp index 8f9b94a5..3fd0e18b 100644 --- a/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp +++ b/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp @@ -18,4 +18,5 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif + diff --git a/include/boost/fusion/tuple/tuple.hpp b/include/boost/fusion/tuple/tuple.hpp index 62350721..dbeff738 100644 --- a/include/boost/fusion/tuple/tuple.hpp +++ b/include/boost/fusion/tuple/tuple.hpp @@ -112,3 +112,4 @@ namespace boost { namespace fusion #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES #endif + diff --git a/include/boost/fusion/tuple/tuple_fwd.hpp b/include/boost/fusion/tuple/tuple_fwd.hpp index e4dbbd28..7c44bd33 100644 --- a/include/boost/fusion/tuple/tuple_fwd.hpp +++ b/include/boost/fusion/tuple/tuple_fwd.hpp @@ -48,3 +48,4 @@ namespace boost { namespace fusion #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES #endif + From 2038772e90a3d811e972c5868ab0fc5877f4d062 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 22 Mar 2012 10:45:12 +0000 Subject: [PATCH 19/99] fixed wrong spelling [SVN r77472] --- .../fusion/include/{repetetive_view.hpp => repetitive_view.hpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename include/boost/fusion/include/{repetetive_view.hpp => repetitive_view.hpp} (100%) diff --git a/include/boost/fusion/include/repetetive_view.hpp b/include/boost/fusion/include/repetitive_view.hpp similarity index 100% rename from include/boost/fusion/include/repetetive_view.hpp rename to include/boost/fusion/include/repetitive_view.hpp From 221e07a7a38cd9edea781a2641cc70d64cc422f4 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 07:34:00 +0000 Subject: [PATCH 20/99] + bumped copyright date + mpl::int_ optimizations [SVN r77802] --- .../container/deque/back_extended_deque.hpp | 20 ++++++++---------- .../boost/fusion/container/deque/convert.hpp | 2 +- .../boost/fusion/container/deque/deque.hpp | 2 +- .../fusion/container/deque/deque_fwd.hpp | 2 +- .../fusion/container/deque/deque_iterator.hpp | 2 +- .../container/deque/detail/as_deque.hpp | 2 +- .../fusion/container/deque/detail/at_impl.hpp | 2 +- .../container/deque/detail/begin_impl.hpp | 2 +- .../container/deque/detail/convert_impl.hpp | 2 +- .../deque/detail/deque_forward_ctor.hpp | 2 +- .../deque/detail/deque_initial_size.hpp | 2 +- .../deque/detail/deque_keyed_values.hpp | 2 +- .../deque/detail/deque_keyed_values_call.hpp | 2 +- .../container/deque/detail/end_impl.hpp | 2 +- .../container/deque/detail/keyed_element.hpp | 2 +- .../container/deque/detail/value_at_impl.hpp | 2 +- .../container/deque/front_extended_deque.hpp | 21 +++++++------------ .../boost/fusion/container/deque/limits.hpp | 2 +- 18 files changed, 33 insertions(+), 40 deletions(-) diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index ef8345f7..b1090df6 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -1,21 +1,18 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209) #define BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209 -#include #include -#include + #include #include - -#include -#include +#include namespace boost { namespace fusion { template @@ -25,11 +22,12 @@ namespace boost { namespace fusion { { typedef detail::keyed_element base; typedef typename Deque::next_down next_down; - typedef mpl::int_ >::value> next_up; - typedef mpl::plus::type, mpl::int_<1> > size; + typedef mpl::int_<(Deque::next_up::value + 1)> next_up; + typedef mpl::int_<(result_of::size::value + 1)> size; - back_extended_deque(Deque const& deque, typename add_reference::type>::type t) - : base(t, deque) + template + back_extended_deque(Deque const& deque, Arg const& val) + : base(val, deque) {} }; }} diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 0f8ea657..f8b6097a 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 97238f4a..d2a069b0 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index 7f9a1f9b..21937f6e 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2007 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/deque_iterator.hpp b/include/boost/fusion/container/deque/deque_iterator.hpp index 3cb02f08..76d8e367 100644 --- a/include/boost/fusion/container/deque/deque_iterator.hpp +++ b/include/boost/fusion/container/deque/deque_iterator.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/as_deque.hpp b/include/boost/fusion/container/deque/detail/as_deque.hpp index bc9ae846..906f4fb6 100644 --- a/include/boost/fusion/container/deque/detail/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/as_deque.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/at_impl.hpp b/include/boost/fusion/container/deque/detail/at_impl.hpp index dc09d31b..daaf6b26 100644 --- a/include/boost/fusion/container/deque/detail/at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/at_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/begin_impl.hpp b/include/boost/fusion/container/deque/detail/begin_impl.hpp index 8c02b9ac..b1ecdd89 100644 --- a/include/boost/fusion/container/deque/detail/begin_impl.hpp +++ b/include/boost/fusion/container/deque/detail/begin_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/convert_impl.hpp b/include/boost/fusion/container/deque/detail/convert_impl.hpp index 9693d95d..c417b81c 100644 --- a/include/boost/fusion/container/deque/detail/convert_impl.hpp +++ b/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index 38d5e643..03b81d7a 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp index 738221ce..6a49b9bb 100644 --- a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp index 898bc46b..079f4b4d 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp index d96f16a0..f9049509 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/end_impl.hpp b/include/boost/fusion/container/deque/detail/end_impl.hpp index 0727e00f..104cda64 100644 --- a/include/boost/fusion/container/deque/detail/end_impl.hpp +++ b/include/boost/fusion/container/deque/detail/end_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index 1b5e3468..720daaa3 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/detail/value_at_impl.hpp b/include/boost/fusion/container/deque/detail/value_at_impl.hpp index 64dbe5e1..5ad74c8c 100644 --- a/include/boost/fusion/container/deque/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/value_at_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 7a7f9cee..648e5966 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -8,16 +8,10 @@ #if !defined(BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209) #define BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209 -#include #include -#include -#include -#include - -#include -#include - #include +#include +#include namespace boost { namespace fusion { @@ -27,12 +21,13 @@ namespace boost { namespace fusion sequence_base > { typedef detail::keyed_element base; - typedef mpl::int_ >::value> next_down; + typedef mpl::int_<(Deque::next_down::value - 1)> next_down; typedef typename Deque::next_up next_up; - typedef mpl::plus::type, mpl::int_<1> > size; + typedef mpl::int_<(result_of::size::value + 1)> size; - front_extended_deque(Deque const& deque, typename add_reference::type>::type t) - : base(t, deque) + template + front_extended_deque(Deque const& deque, Arg const& val) + : base(val, deque) {} }; }} diff --git a/include/boost/fusion/container/deque/limits.hpp b/include/boost/fusion/container/deque/limits.hpp index 891d41ed..e59df852 100644 --- a/include/boost/fusion/container/deque/limits.hpp +++ b/include/boost/fusion/container/deque/limits.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2011 Joel de Guzman + Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying From 92d51dcfa8db4e92c6cbdfadd1147d079a689324 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 07:43:05 +0000 Subject: [PATCH 21/99] c++11 version start [SVN r77803] --- .../fusion/container/deque/{deque.hpp => cpp03_deque.hpp} | 4 ++-- .../container/deque/{deque_fwd.hpp => cpp03_deque_fwd.hpp} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename include/boost/fusion/container/deque/{deque.hpp => cpp03_deque.hpp} (97%) rename include/boost/fusion/container/deque/{deque_fwd.hpp => cpp03_deque_fwd.hpp} (94%) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/cpp03_deque.hpp similarity index 97% rename from include/boost/fusion/container/deque/deque.hpp rename to include/boost/fusion/container/deque/cpp03_deque.hpp index d2a069b0..c7805764 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/cpp03_deque.hpp @@ -5,8 +5,8 @@ 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(BOOST_FUSION_DEQUE_26112006_1649) -#define BOOST_FUSION_DEQUE_26112006_1649 +#if !defined(BOOST_CPP03_FUSION_DEQUE_26112006_1649) +#define BOOST_CPP03_FUSION_DEQUE_26112006_1649 #include #include diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp similarity index 94% rename from include/boost/fusion/container/deque/deque_fwd.hpp rename to include/boost/fusion/container/deque/cpp03_deque_fwd.hpp index 21937f6e..90897718 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp @@ -5,8 +5,8 @@ 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(FUSION_DEQUE_FORWARD_02092007_0749) -#define FUSION_DEQUE_FORWARD_02092007_0749 +#if !defined(FUSION_CPP03_DEQUE_FORWARD_02092007_0749) +#define FUSION_CPP03_DEQUE_FORWARD_02092007_0749 #include #include From e15c27bc8be0a82439550fa60780adf739f5f0d9 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 07:54:18 +0000 Subject: [PATCH 22/99] partial update (upgrade to c++11) [SVN r77805] --- .../container/deque/back_extended_deque.hpp | 12 +++++++++++ .../boost/fusion/container/deque/deque.hpp | 19 +++++++++++++++++ .../fusion/container/deque/deque_fwd.hpp | 21 +++++++++++++++++++ .../container/deque/front_extended_deque.hpp | 12 +++++++++++ 4 files changed, 64 insertions(+) create mode 100644 include/boost/fusion/container/deque/deque.hpp create mode 100644 include/boost/fusion/container/deque/deque_fwd.hpp diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index b1090df6..f11aef83 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -29,6 +29,18 @@ namespace boost { namespace fusion { back_extended_deque(Deque const& deque, Arg const& val) : base(val, deque) {} + +#if defined(BOOST_NO_RVALUE_REFERENCES) + template + back_extended_deque(Deque const& deque, Arg& val) + : base(val, deque) + {} +#else + template + back_extended_deque(Deque const& deque, Arg&& val) + : base(std::forward(val), deque) + {} +#endif }; }} diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp new file mode 100644 index 00000000..4aef8144 --- /dev/null +++ b/include/boost/fusion/container/deque/deque.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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(BOOST_FUSION_DEQUE_26112006_1649) +#define BOOST_FUSION_DEQUE_26112006_1649 + +#if (defined(BOOST_NO_DECLTYPE) \ + || defined(BOOST_NO_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_RVALUE_REFERENCES)) +# include +#else +# include +#endif + +#endif diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp new file mode 100644 index 00000000..4d32b9fd --- /dev/null +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2007 Dan Marsden + + 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(FUSION_DEQUE_FORWARD_02092007_0749) +#define FUSION_DEQUE_FORWARD_02092007_0749 + +#include + +#if (defined(BOOST_NO_DECLTYPE) \ + || defined(BOOST_NO_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_RVALUE_REFERENCES)) +# include +#else +# include +#endif + +#endif diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 648e5966..0d672dad 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -29,6 +29,18 @@ namespace boost { namespace fusion front_extended_deque(Deque const& deque, Arg const& val) : base(val, deque) {} + +#if defined(BOOST_NO_RVALUE_REFERENCES) + template + front_extended_deque(Deque const& deque, Arg& val) + : base(val, deque) + {} +#else + template + front_extended_deque(Deque const& deque, Arg&& val) + : base(std::forward(val), deque) + {} +#endif }; }} From 93ce3bd9bfcb0f9f024ba565ff9a6dfd740fd30b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 09:56:07 +0000 Subject: [PATCH 23/99] c++ port of deque underway [SVN r77808] --- include/boost/fusion/container/deque.hpp | 2 +- .../container/deque/back_extended_deque.hpp | 7 +++--- .../boost/fusion/container/deque/deque.hpp | 2 +- .../fusion/container/deque/deque_fwd.hpp | 2 +- .../fusion/container/deque/deque_iterator.hpp | 8 +++---- .../fusion/container/deque/detail/at_impl.hpp | 19 +++++++++------- .../container/deque/detail/begin_impl.hpp | 22 ++++++++++--------- .../container/deque/detail/keyed_element.hpp | 6 ++--- .../container/deque/detail/value_at_impl.hpp | 18 ++++++++------- .../container/deque/front_extended_deque.hpp | 4 ++-- 10 files changed, 49 insertions(+), 41 deletions(-) diff --git a/include/boost/fusion/container/deque.hpp b/include/boost/fusion/container/deque.hpp index 0ee058a3..457b5166 100644 --- a/include/boost/fusion/container/deque.hpp +++ b/include/boost/fusion/container/deque.hpp @@ -9,7 +9,7 @@ #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 #include -#include +//#include #endif diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index f11aef83..85edaed0 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -14,11 +14,12 @@ #include #include -namespace boost { namespace fusion { +namespace boost { namespace fusion +{ template struct back_extended_deque - : detail::keyed_element, - sequence_base > + : detail::keyed_element + , sequence_base > { typedef detail::keyed_element base; typedef typename Deque::next_down next_down; diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 4aef8144..b5677f86 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -13,7 +13,7 @@ || defined(BOOST_NO_RVALUE_REFERENCES)) # include #else -# include +# include #endif #endif diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index 4d32b9fd..1da01353 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -15,7 +15,7 @@ || defined(BOOST_NO_RVALUE_REFERENCES)) # include #else -# include +# include #endif #endif diff --git a/include/boost/fusion/container/deque/deque_iterator.hpp b/include/boost/fusion/container/deque/deque_iterator.hpp index 76d8e367..d3e5f31e 100644 --- a/include/boost/fusion/container/deque/deque_iterator.hpp +++ b/include/boost/fusion/container/deque/deque_iterator.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_ITERATOR_26112006_2154) @@ -12,13 +12,13 @@ #include #include #include -#include +#include namespace boost { namespace fusion { struct bidirectional_traversal_tag; - template + template struct deque_iterator : iterator_facade, bidirectional_traversal_tag> { @@ -84,7 +84,7 @@ namespace boost { namespace fusion { typedef typename mpl::minus< typename I2::index, typename I1::index - >::type + >::type type; static type diff --git a/include/boost/fusion/container/deque/detail/at_impl.hpp b/include/boost/fusion/container/deque/detail/at_impl.hpp index daaf6b26..bf5f91a1 100644 --- a/include/boost/fusion/container/deque/detail/at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/at_impl.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017) @@ -19,15 +19,15 @@ #include #include -namespace boost { namespace fusion { +namespace boost { namespace fusion { struct deque_tag; - namespace extension + namespace extension { template struct at_impl; - + template<> struct at_impl { @@ -37,10 +37,13 @@ namespace boost { namespace fusion { typedef typename Sequence::next_up next_up; typedef typename Sequence::next_down next_down; BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); - - typedef mpl::plus > offset; - typedef mpl::int_::value> adjusted_index; - typedef typename detail::keyed_element_value_at::type element_type; + + static int const offset = next_down::value + 1; + typedef mpl::int_<(N::value + offset)> adjusted_index; + typedef typename + detail::keyed_element_value_at::type + element_type; + typedef typename add_reference< typename mpl::eval_if< is_const, diff --git a/include/boost/fusion/container/deque/detail/begin_impl.hpp b/include/boost/fusion/container/deque/detail/begin_impl.hpp index b1ecdd89..b904b6c5 100644 --- a/include/boost/fusion/container/deque/detail/begin_impl.hpp +++ b/include/boost/fusion/container/deque/detail/begin_impl.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034) @@ -13,27 +13,29 @@ #include #include -namespace boost { namespace fusion { +namespace boost { namespace fusion { struct deque_tag; - namespace extension + namespace extension { template struct begin_impl; - + template<> struct begin_impl { template struct apply { - typedef typename mpl::if_< - mpl::equal_to, - deque_iterator, - deque_iterator< - Sequence, mpl::plus >::value> >::type type; - + typedef typename + mpl::if_c< + (Sequence::next_down::value == Sequence::next_up::value) + , deque_iterator + , deque_iterator + >::type + type; + static type call(Sequence& seq) { return type(seq); diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index 720daaa3..c080fe99 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330) @@ -26,7 +26,7 @@ namespace detail { void get(); template - static nil_keyed_element + static nil_keyed_element from_iterator(It const&) { return nil_keyed_element(); @@ -49,7 +49,7 @@ namespace detail { *it, base::from_iterator(fusion::next(it))); } - template + template keyed_element(keyed_element const& rhs) : Rest(rhs.get_base()), value_(rhs.value_) {} diff --git a/include/boost/fusion/container/deque/detail/value_at_impl.hpp b/include/boost/fusion/container/deque/detail/value_at_impl.hpp index 5ad74c8c..cfc88ba7 100644 --- a/include/boost/fusion/container/deque/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/value_at_impl.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_VALUE_AT_IMPL_08122006_0756) @@ -13,15 +13,15 @@ #include #include -namespace boost { namespace fusion { +namespace boost { namespace fusion { struct deque_tag; - namespace extension + namespace extension { template struct value_at_impl; - + template<> struct value_at_impl { @@ -31,10 +31,12 @@ namespace boost { namespace fusion { typedef typename Sequence::next_up next_up; typedef typename Sequence::next_down next_down; BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); - - typedef mpl::plus > offset; - typedef mpl::int_::value> adjusted_index; - typedef typename detail::keyed_element_value_at::type type; + + static int const offset = next_down::value + 1; + typedef mpl::int_<(N::value + offset)> adjusted_index; + typedef typename + detail::keyed_element_value_at::type + type; }; }; } diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 0d672dad..13da910a 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -17,8 +17,8 @@ namespace boost { namespace fusion { template struct front_extended_deque - : detail::keyed_element, - sequence_base > + : detail::keyed_element + , sequence_base > { typedef detail::keyed_element base; typedef mpl::int_<(Deque::next_down::value - 1)> next_down; From a36f0f95cb80b3973d67edfd9a2f135b23979b3f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 10:08:00 +0000 Subject: [PATCH 24/99] c++ port of deque working [SVN r77809] --- .../fusion/container/deque/cpp11_deque.hpp | 127 ++++++++++++++++++ .../container/deque/cpp11_deque_fwd.hpp | 19 +++ 2 files changed, 146 insertions(+) create mode 100644 include/boost/fusion/container/deque/cpp11_deque.hpp create mode 100644 include/boost/fusion/container/deque/cpp11_deque_fwd.hpp diff --git a/include/boost/fusion/container/deque/cpp11_deque.hpp b/include/boost/fusion/container/deque/cpp11_deque.hpp new file mode 100644 index 00000000..c6d70d33 --- /dev/null +++ b/include/boost/fusion/container/deque/cpp11_deque.hpp @@ -0,0 +1,127 @@ +/*============================================================================= + Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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(BOOST_CPP03_FUSION_DEQUE_26112006_1649) +#define BOOST_CPP03_FUSION_DEQUE_26112006_1649 + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace fusion +{ + namespace detail + { + template + struct keyed_element; + + template + struct deque_keyed_values_impl; + + template + struct deque_keyed_values_impl + { + typedef mpl::int_<(N::value + 1)> next_index; + typedef typename deque_keyed_values_impl::type tail; + typedef keyed_element type; + + static type call( + typename add_reference::type>::type head + , typename add_reference::type>::type... tail) + { + return type( + head + , deque_keyed_values_impl::call(tail...) + ); + } + }; + + struct nil_keyed_element; + + template + struct deque_keyed_values_impl + { + typedef nil_keyed_element type; + static type call() { return type(); } + }; + + template + struct deque_keyed_values + : deque_keyed_values_impl, Elements...> {}; + } + + struct deque_tag; + + template + struct deque; + + template + struct deque + : detail::deque_keyed_values::type + , sequence_base> + { + typedef deque_tag fusion_tag; + typedef bidirectional_traversal_tag category; + typedef typename detail::deque_keyed_values::type base; + typedef mpl::int_<(sizeof ...(Tail) + 1)> size; + typedef mpl::int_ next_up; + typedef mpl::int_::type::value> next_down; + typedef mpl::false_ is_view; + + deque() + {} + + explicit deque(typename add_reference::type>::type elem) + : base(elem, detail::nil_keyed_element()) + {} + + template + deque(deque const& seq) + : base(seq) + {} + + deque(typename add_reference::type>::type head + , typename add_reference::type>::type... tail) + : base(detail::deque_keyed_values::call(head, tail...)) + {} + + template + deque(Sequence const& seq + , typename disable_if >::type* /*dummy*/ = 0) + : base(base::from_iterator(fusion::begin(seq))) + {} + + template + deque& operator=(deque const& rhs) + { + base::operator=(rhs); + return *this; + } + + template + deque& operator=(T const& rhs) + { + base::operator=(rhs); + return *this; + } + }; +}} + +#endif diff --git a/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp b/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp new file mode 100644 index 00000000..420fe611 --- /dev/null +++ b/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2007 Dan Marsden + + 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(FUSION_CPP11_DEQUE_FORWARD_04072012_0355) +#define FUSION_CPP11_DEQUE_FORWARD_04072012_0355 + +namespace boost { namespace fusion +{ + struct void_; + + template + struct deque; +}} + +#endif From 2936fd30fb691c7d88eec48a6843e03cd690f29a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 10:26:23 +0000 Subject: [PATCH 25/99] missing include [SVN r77810] --- include/boost/fusion/container/deque/deque.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index b5677f86..131cb026 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -8,6 +8,8 @@ #if !defined(BOOST_FUSION_DEQUE_26112006_1649) #define BOOST_FUSION_DEQUE_26112006_1649 +#include + #if (defined(BOOST_NO_DECLTYPE) \ || defined(BOOST_NO_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_RVALUE_REFERENCES)) From ec99f829f3a8b2d24a84305d1266656ed4eb0b28 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 10:57:10 +0000 Subject: [PATCH 26/99] updates [SVN r77811] --- .../boost/fusion/container/deque/convert.hpp | 4 ++- .../fusion/container/deque/cpp03_deque.hpp | 4 +++ .../container/deque/cpp03_deque_fwd.hpp | 4 +++ .../boost/fusion/container/deque/deque.hpp | 3 ++ .../fusion/container/deque/deque_fwd.hpp | 3 ++ .../fusion/container/deque/detail/at_impl.hpp | 17 +++++----- .../container/deque/detail/begin_impl.hpp | 4 +-- .../container/deque/detail/convert_impl.hpp | 2 +- .../deque/detail/deque_forward_ctor.hpp | 6 +++- .../deque/detail/deque_initial_size.hpp | 4 +++ .../deque/detail/deque_keyed_values.hpp | 4 +++ .../deque/detail/deque_keyed_values_call.hpp | 4 +++ .../container/deque/detail/end_impl.hpp | 24 +++++++------- .../deque/detail/is_sequence_impl.hpp | 10 +++--- .../container/deque/detail/keyed_element.hpp | 31 ++++++++++--------- .../container/deque/detail/value_at_impl.hpp | 4 +-- 16 files changed, 83 insertions(+), 45 deletions(-) diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index f8b6097a..1910cb84 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -21,7 +21,9 @@ namespace boost { namespace fusion template struct as_deque { - typedef typename detail::as_deque::value> gen; + typedef typename + detail::as_deque::value> + gen; typedef typename gen:: template apply::type>::type type; diff --git a/include/boost/fusion/container/deque/cpp03_deque.hpp b/include/boost/fusion/container/deque/cpp03_deque.hpp index c7805764..d3eaa7cd 100644 --- a/include/boost/fusion/container/deque/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/cpp03_deque.hpp @@ -8,6 +8,10 @@ #if !defined(BOOST_CPP03_FUSION_DEQUE_26112006_1649) #define BOOST_CPP03_FUSION_DEQUE_26112006_1649 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include #include diff --git a/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp b/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp index 90897718..3a74447b 100644 --- a/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp +++ b/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp @@ -8,6 +8,10 @@ #if !defined(FUSION_CPP03_DEQUE_FORWARD_02092007_0749) #define FUSION_CPP03_DEQUE_FORWARD_02092007_0749 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 131cb026..0a3353b7 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -15,6 +15,9 @@ || defined(BOOST_NO_RVALUE_REFERENCES)) # include #else +# if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) +# define BOOST_FUSION_HAS_CPP11_DEQUE +# endif # include #endif diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index 1da01353..d1696936 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -15,6 +15,9 @@ || defined(BOOST_NO_RVALUE_REFERENCES)) # include #else +# if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) +# define BOOST_FUSION_HAS_CPP11_DEQUE +# endif # include #endif diff --git a/include/boost/fusion/container/deque/detail/at_impl.hpp b/include/boost/fusion/container/deque/detail/at_impl.hpp index bf5f91a1..0684dcf1 100644 --- a/include/boost/fusion/container/deque/detail/at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/at_impl.hpp @@ -19,8 +19,8 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct deque_tag; namespace extension @@ -44,11 +44,14 @@ namespace boost { namespace fusion { detail::keyed_element_value_at::type element_type; - typedef typename add_reference< - typename mpl::eval_if< - is_const, - add_const, - mpl::identity >::type>::type type; + typedef typename + add_reference< + typename mpl::eval_if< + is_const, + add_const, + mpl::identity >::type + >::type + type; static type call(Sequence& seq) { diff --git a/include/boost/fusion/container/deque/detail/begin_impl.hpp b/include/boost/fusion/container/deque/detail/begin_impl.hpp index b904b6c5..1447868a 100644 --- a/include/boost/fusion/container/deque/detail/begin_impl.hpp +++ b/include/boost/fusion/container/deque/detail/begin_impl.hpp @@ -13,8 +13,8 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct deque_tag; namespace extension diff --git a/include/boost/fusion/container/deque/detail/convert_impl.hpp b/include/boost/fusion/container/deque/detail/convert_impl.hpp index c417b81c..1401ef1a 100644 --- a/include/boost/fusion/container/deque/detail/convert_impl.hpp +++ b/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion template struct apply { - typedef typename detail::as_deque::value> gen; + typedef detail::as_deque::value> gen; typedef typename gen:: template apply::type>::type type; diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index 03b81d7a..b76916eb 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -2,13 +2,17 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_PP_IS_ITERATING) #if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212) #define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include #include diff --git a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp index 6a49b9bb..edb3c176 100644 --- a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp @@ -8,6 +8,10 @@ #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139) #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include #include diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp index 079f4b4d..2fee4700 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp @@ -8,6 +8,10 @@ #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330) #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp index f9049509..f95960bc 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -9,6 +9,10 @@ #if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211) #define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #include #include diff --git a/include/boost/fusion/container/deque/detail/end_impl.hpp b/include/boost/fusion/container/deque/detail/end_impl.hpp index 104cda64..8037689a 100644 --- a/include/boost/fusion/container/deque/detail/end_impl.hpp +++ b/include/boost/fusion/container/deque/detail/end_impl.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_DEQUE_END_IMPL_09122006_2034) @@ -13,27 +13,29 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct deque_tag; - namespace extension + namespace extension { template struct end_impl; - + template<> struct end_impl { template struct apply { - typedef typename mpl::if_< - mpl::equal_to, - deque_iterator, - deque_iterator< - Sequence, Sequence::next_up::value> >::type type; - + typedef typename + mpl::if_c< + (Sequence::next_down::value == Sequence::next_up::value) + , deque_iterator + , deque_iterator + >::type + type; + static type call(Sequence& seq) { return type(seq); diff --git a/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp b/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp index ff88ed6f..b4718be4 100644 --- a/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp +++ b/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2010 Christopher Schmidt - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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) ==============================================================================*/ @@ -14,18 +14,16 @@ namespace boost { namespace fusion { struct deque_tag; - namespace extension + namespace extension { template struct is_sequence_impl; - + template<> struct is_sequence_impl { template - struct apply - : mpl::true_ - {}; + struct apply : mpl::true_ {}; }; } }} diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index c080fe99..e158096b 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -14,12 +14,13 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct fusion_sequence_tag; +}} -namespace detail { - +namespace boost { namespace fusion { namespace detail +{ struct nil_keyed_element { typedef fusion_sequence_tag tag; @@ -33,15 +34,18 @@ namespace detail { } }; - template - struct keyed_element - : Rest + template + struct keyed_element : Rest { typedef Rest base; typedef fusion_sequence_tag tag; + typedef typename + add_reference::type>::type + const_value_type; + typedef typename add_reference::type value_type; using Rest::get; - template + template static keyed_element from_iterator(It const& it) { @@ -51,7 +55,7 @@ namespace detail { template keyed_element(keyed_element const& rhs) - : Rest(rhs.get_base()), value_(rhs.value_) + : Rest(rhs.get_base()), value_(rhs.value_) {} Rest const get_base() const @@ -59,17 +63,17 @@ namespace detail { return *this; } - typename add_reference::type>::type get(Key) const + const_value_type get(Key) const { return value_; } - typename add_reference::type get(Key) + value_type get(Key) { return value_; } - keyed_element(typename add_reference::type>::type value, Rest const& rest) + keyed_element(const_value_type value, Rest const& rest) : Rest(rest), value_(value) {} @@ -97,7 +101,7 @@ namespace detail { template struct keyed_element_value_at - : keyed_element_value_at + : keyed_element_value_at {}; template @@ -105,7 +109,6 @@ namespace detail { { typedef Value type; }; - }}} #endif diff --git a/include/boost/fusion/container/deque/detail/value_at_impl.hpp b/include/boost/fusion/container/deque/detail/value_at_impl.hpp index cfc88ba7..cba31a3e 100644 --- a/include/boost/fusion/container/deque/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/deque/detail/value_at_impl.hpp @@ -13,8 +13,8 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct deque_tag; namespace extension From b34a8c79e829b20f868603f21106f90fd16fb664 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 11:07:35 +0000 Subject: [PATCH 27/99] hide detail stuff [SVN r77812] --- .../fusion/container/deque/cpp03_deque.hpp | 2 +- .../fusion/container/deque/cpp11_deque.hpp | 41 +------------- ...alues.hpp => cpp03_deque_keyed_values.hpp} | 0 .../deque/detail/cpp11_deque_keyed_values.hpp | 56 +++++++++++++++++++ 4 files changed, 58 insertions(+), 41 deletions(-) rename include/boost/fusion/container/deque/detail/{deque_keyed_values.hpp => cpp03_deque_keyed_values.hpp} (100%) create mode 100644 include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp diff --git a/include/boost/fusion/container/deque/cpp03_deque.hpp b/include/boost/fusion/container/deque/cpp03_deque.hpp index d3eaa7cd..5804d890 100644 --- a/include/boost/fusion/container/deque/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/cpp03_deque.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/container/deque/cpp11_deque.hpp b/include/boost/fusion/container/deque/cpp11_deque.hpp index c6d70d33..bcb6c6c8 100644 --- a/include/boost/fusion/container/deque/cpp11_deque.hpp +++ b/include/boost/fusion/container/deque/cpp11_deque.hpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -27,46 +28,6 @@ namespace boost { namespace fusion { - namespace detail - { - template - struct keyed_element; - - template - struct deque_keyed_values_impl; - - template - struct deque_keyed_values_impl - { - typedef mpl::int_<(N::value + 1)> next_index; - typedef typename deque_keyed_values_impl::type tail; - typedef keyed_element type; - - static type call( - typename add_reference::type>::type head - , typename add_reference::type>::type... tail) - { - return type( - head - , deque_keyed_values_impl::call(tail...) - ); - } - }; - - struct nil_keyed_element; - - template - struct deque_keyed_values_impl - { - typedef nil_keyed_element type; - static type call() { return type(); } - }; - - template - struct deque_keyed_values - : deque_keyed_values_impl, Elements...> {}; - } - struct deque_tag; template diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp diff --git a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp new file mode 100644 index 00000000..e8ae0fa1 --- /dev/null +++ b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901) +#define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct keyed_element; + + template + struct deque_keyed_values_impl; + + template + struct deque_keyed_values_impl + { + typedef mpl::int_<(N::value + 1)> next_index; + typedef typename deque_keyed_values_impl::type tail; + typedef keyed_element type; + + static type call( + typename add_reference::type>::type head + , typename add_reference::type>::type... tail) + { + return type( + head + , deque_keyed_values_impl::call(tail...) + ); + } + }; + + struct nil_keyed_element; + + template + struct deque_keyed_values_impl + { + typedef nil_keyed_element type; + static type call() { return type(); } + }; + + template + struct deque_keyed_values + : deque_keyed_values_impl, Elements...> {}; +}}} + +#endif From d87b5a800046ecbb6d026f3dd4df23b4339e880c Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 7 Apr 2012 12:02:16 +0000 Subject: [PATCH 28/99] minor tweaks [SVN r77814] --- include/boost/fusion/container/deque/limits.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/fusion/container/deque/limits.hpp b/include/boost/fusion/container/deque/limits.hpp index e59df852..2a7d219d 100644 --- a/include/boost/fusion/container/deque/limits.hpp +++ b/include/boost/fusion/container/deque/limits.hpp @@ -8,6 +8,10 @@ #if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737) #define BOOST_FUSION_DEQUE_LIMITS_26112006_1737 +#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + #include #if !defined(FUSION_MAX_DEQUE_SIZE) From a3c225801743386df2bad2faf55d76cfcc43c5a3 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 10 Apr 2012 02:30:18 +0000 Subject: [PATCH 29/99] Added deque docs [SVN r77879] --- doc/container.qbk | 524 +++++++++++++++++++++++++++++++++++++++++++++- doc/fusion.qbk | 9 +- 2 files changed, 525 insertions(+), 8 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index f8a13e03..51ad2230 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -21,10 +21,11 @@ __views__. These containers are more or less counterparts of those in __stl__. [heading Description] -`vector` is a __random_access_sequence__ of heterogenous typed -data structured as a simple `struct` where each element is held -as a member variable. `vector` is the simplest of the Fusion -sequence container, and in many cases the most efficient. +`vector` is a __random_access_sequence__ of heterogenous typed data +structured as a simple `struct` where each element is held as a member +variable. `vector` is the simplest of the Fusion sequence container (a +vector with N elements is just a struct with N members), and in many +cases the most efficient. [heading Header] @@ -246,7 +247,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] + [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] ] [heading Model of] @@ -289,6 +290,238 @@ constant (see __recursive_inline__).] [endsect] +[section deque] + +[heading Description] + +`deque` is a simple __bidirectional_sequence__ that supports +constant-time insertion and removal of elements at both ends. Like the +__list__ and __cons__, `deque` is more efficient than __vector__ +(especially at compile time) when the target sequence is constructed +piecemeal (a data at a time, e.g. when constructing expression +templates). Like the __list__ and __cons__, runtime cost of access to +each element is peculiarly constant (see __recursive_inline__). + +Element insertion and removal are done by special `deque` helper classes +__front_extended_deque__ and __back_extended_deque__. + +[heading Header] + + #include + #include + #include + #include + +[heading C++03 Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct deque; + +The variadic class interface accepts `0` to `FUSION_MAX_DEQUE_SIZE` +elements, where `FUSION_MAX_DEQUE_SIZE` is a user definable predefined +maximum that defaults to `10`. Example: + + deque + +You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading C++03 Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] +] + +[heading C++11 Synopsis] + + template + struct deque; + +For C++11 compilers, the variadic class interface has no upper bound. + +[heading C++11 Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Elements`] [Element types] [[]]] +] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `deque` type]] + [[`d`, `d2`] [Instances of `deque`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D()`] [Creates a deque with default constructed elements.]] + [[`D(e0, e1,... en)`] [Creates a deque with elements `e0`...`en`.]] + [[`D(s)`] [Copy constructs a deque from a __forward_sequence__, `s`.]] + [[`d = s`] [Assigns to a deque, `d`, from a __forward_sequence__, `s`.]] + [[`__at__(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__(d)` is provided for convenience, despite +`deque` being a __bidirectional_sequence__ only (`at` is supposed to be +a __random_access_sequence__ requirement). The runtime complexity of +__at__ is constant (see __recursive_inline__). `deque` element access +utilizes operator overloading with argument dependent lookup (ADL) of +the proper element getter function given a static constant index +parameter. Interestingly, with modern C++ compilers, this lookup is very +fast and rivals recursive template instantiations in compile time-speed, +so much so that `deque` relies on ADL for all element access (indexing) +as well as iteration.] + +[heading Example] + + deque d(12, 5.5f); + std::cout << __at_c__<0>(d) << std::endl; + std::cout << __at_c__<1>(d) << std::endl; + +[endsect] + +[section front_extended_deque] + +[heading Description] + +`front_extended_deque` allows a __deque__ to be front extended. It shares +the same properties as the __deque__. + +[heading Header] + + See __deque__ + +[heading Synopsis] + + template + struct front_extended_deque; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Deque`] [Deque type] []] + [[`T`] [Element type] []] +] + +[`Deque` can be a __deque__, a __front_extended_deque__ or a +__back_extended_deque__] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `front_extended_deque` type]] + [[`e`] [Heterogeneous value]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is +not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D(d, e)`] [Extend `d` prepending `e` to its front.]] + [[`__at__(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ See __deque__ for further details.] + +[heading Example] + + typedef deque initial_deque; + initial_deque d(12, 5.5f); + front_extended_deque d2(d, 999); + std::cout << __at_c__<0>(d2) << std::endl; + std::cout << __at_c__<1>(d2) << std::endl; + std::cout << __at_c__<2>(d2) << std::endl; + +[endsect] + +[section back_extended_deque] + +[heading Description] + +`back_extended_deque` allows a __deque__ to be back extended. It shares +the same properties as the __deque__. + +[heading Header] + + See __deque__ + +[heading Synopsis] + + template + struct back_extended_deque; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Deque`] [Deque type] []] + [[`T`] [Element type] []] +] + +[`Deque` can be a __deque__, a __back_extended_deque__ or a +__back_extended_deque__] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `back_extended_deque` type]] + [[`e`] [Heterogeneous value]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is +not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D(d, e)`] [Extend `d` prepending `e` to its back.]] + [[`__at__(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ See __deque__ for further details.] + +[heading Example] + + typedef deque initial_deque; + initial_deque d(12, 5.5f); + back_extended_deque d2(d, 999); + std::cout << __at_c__<0>(d2) << std::endl; + std::cout << __at_c__<1>(d2) << std::endl; + std::cout << __at_c__<2>(d2) << std::endl; + +[endsect] + [section set] [heading Description] @@ -332,7 +565,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] + [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] ] [heading Model of] @@ -414,7 +647,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] + [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] ] [heading Model of] @@ -617,6 +850,78 @@ __note_boost_ref__ [endsect] +[section make_deque] + +[heading Description] + +Create a __deque__ from one or more values. + +[heading C++03 Synopsis] + + template + typename __result_of_make_deque__::type + make_deque(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where +`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading C++03 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_deque`]] +] + +[heading C++03 Expression Semantics] + + make_deque(x0, x1,... xN); + +[*Return type]: __result_of_make_deque__`::type` + +[*Semantics]: Create a __deque__ from `x0, x1,... xN`. + +[heading C++11 Synopsis] + + template + typename __result_of_make_deque__::type + make_deque(Elements const&... elements); + +For C++11 compilers, the variadic function interface has no upper bound. + +[heading C++11 Parameters] + +[table + [[Parameter] [Description] [Description]] + [[`elements`] [Instances of `Elements`] [The arguments to `make_deque`]] +] + +[heading C++11 Expression Semantics] + + make_deque(elements...); + +[*Return type]: __result_of_make_deque__`::type` + +[*Semantics]: Create a __deque__ from `elements...`. + +[heading Header] + + #include + #include + +[heading Example] + + make_deque(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + [section make_set] [heading Description] @@ -734,6 +1039,7 @@ succeeding sections document the various /tier/ flavors. * __list_tie__ * __vector_tie__ * __map_tie__ +* __deque_tie__ Example: @@ -914,6 +1220,76 @@ including any Fusion header to change the default. Example: [endsect] +[section deque_tie] + +[heading Description] + +Constructs a tie using a __deque__ sequence. + +[heading C++03 Synopsis] + + template + __deque__ + deque_tie(T0& x0, T1& x1... TN& xN); + +The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where +`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading C++03 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `deque_tie`]] +] + +[heading C++03 Expression Semantics] + + deque_tie(x0, x1,... xN); + +[*Return type]: __deque__ + +[*Semantics]: Create a __deque__ of references from `x0, x1,... xN`. + +[heading C++11 Synopsis] + + template + __deque__ + deque_tie(Elements&... elements); + +For C++11 compilers, the variadic function interface has no upper bound. + +[heading C++11 Parameters] + +[table + [[Parameter] [Description] [Description]] + [[`elements`] [Instances of `Elements`] [The arguments to `deque_tie`]] +] + +[heading C++11 Expression Semantics] + + deque_tie(elements...); + +[*Return type]: __deque__ + +[*Semantics]: Create a __deque__ of references from `elements...`. + +[heading Header] + + #include + #include + +[heading Example] + + int i = 123; + double d = 123.456; + deque_tie(i, d) + +[endsect] + [endsect] [section MetaFunctions] @@ -1048,6 +1424,74 @@ rules for __element_conversion__. [endsect] +[section make_deque] + +[heading Description] + +Returns the result type of __make_deque__. + +[heading C++03 Synopsis] + + template + struct make_deque; + +The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where +`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading C++03 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [Template arguments to `make_deque`]] +] + +[heading C++03 Expression Semantics] + + result_of::make_deque::type + +[*Return type]: A __deque__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __deque__ from `T0, T1,... TN`. + +[heading C++11 Synopsis] + + template + struct make_deque; + +For C++11 compilers, the variadic template interface has no upper bound. + +[heading C++11 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Elements`] [Variadic template types] [Template arguments to `make_deque`]] +] + +[heading C++11 Expression Semantics] + + result_of::make_deque::type + +[*Return type]: A __deque__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __deque__ from `Elements...`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_deque::type + +[endsect] + [section make_set] [heading Description] @@ -1240,6 +1684,72 @@ default. Example: [endsect] +[section deque_tie] + +[heading Description] + +Returns the result type of __deque_tie__. + +[heading C++03 Synopsis] + + template + struct deque_tie; + +The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where +`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading C++03 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `deque_tie`]] +] + +[heading C++03 Expression Semantics] + + result_of::deque_tie::type; + +[*Return type]: __deque__ + +[*Semantics]: Create a __deque__ of references from `T0, T1,... TN`. + +[heading C++11 Synopsis] + + template + struct deque_tie; + +For C++11 compilers, the variadic template interface has no upper bound. + +[heading C++11 Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Elements`] [Variadic template types] [Template arguments to `deque_tie`]] +] + +[heading C++11 Expression Semantics] + + result_of::deque_tie::type; + +[*Return type]: __deque__ + +[*Semantics]: Create a __deque__ of references from `Elements...`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::deque_tie::type + +[endsect] + [section map_tie] [heading Description] diff --git a/doc/fusion.qbk b/doc/fusion.qbk index ce0141b8..28e1f140 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -11,7 +11,7 @@ [quickbook 1.3] [version 2.2] [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]] - [copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger] + [copyright 2001 2002 2003 2004 2005 2006 2011 2012 Joel de Guzman, Dan Marsden, Tobias Schwinger] [purpose Statically Typed Heterogeneous Data Structures and Algorithms] [license Distributed under the Boost Software License, Version 1.0. @@ -116,6 +116,9 @@ [def __vector__ [link fusion.container.vector `vector`]] [def __cons__ [link fusion.container.cons `cons`]] [def __list__ [link fusion.container.list `list`]] +[def __deque__ [link fusion.container.deque `deque`]] +[def __front_extended_deque__ [link fusion.container.front_extended_deque `front_extended_deque`]] +[def __back_extended_deque__ [link fusion.container.back_extended_deque `back_extended_deque`]] [def __set__ [link fusion.container.set `set`]] [def __map__ [link fusion.container.map `map`]] @@ -198,12 +201,16 @@ [def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]] [def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]] [def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]] +[def __make_deque__ [link fusion.container.generation.functions.make_deque `make_deque`]] +[def __result_of_make_deque__ [link fusion.container.generation.metafunctions.make_deque `result_of::make_deque`]] [def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]] [def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]] [def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]] [def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]] [def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]] [def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]] +[def __deque_tie__ [link fusion.container.generation.functions.deque_tie `deque_tie`]] +[def __result_of_deque_tie__ [link fusion.container.generation.metafunctions.deque_tie `result_of::deque_tie`]] [def __out__ [link fusion.sequence.operator.i_o.out out]] [def __in__ [link fusion.sequence.operator.i_o.in in]] From ecc87abaaba3adc2d12c7d6be43956768ad9696b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 14 Apr 2012 00:57:15 +0000 Subject: [PATCH 30/99] more deque updates [SVN r77967] --- include/boost/fusion/container/deque.hpp | 2 +- include/boost/fusion/container/deque/back_extended_deque.hpp | 2 +- include/boost/fusion/container/deque/front_extended_deque.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/fusion/container/deque.hpp b/include/boost/fusion/container/deque.hpp index 457b5166..0ee058a3 100644 --- a/include/boost/fusion/container/deque.hpp +++ b/include/boost/fusion/container/deque.hpp @@ -9,7 +9,7 @@ #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 #include -//#include +#include #endif diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index 85edaed0..738e05bb 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -16,7 +16,7 @@ namespace boost { namespace fusion { - template + template struct back_extended_deque : detail::keyed_element , sequence_base > diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 13da910a..2f3654ed 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -15,7 +15,7 @@ namespace boost { namespace fusion { - template + template struct front_extended_deque : detail::keyed_element , sequence_base > From b7eda8d0f49551f7774bd6a85c5f90878c3e1a91 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 15 Apr 2012 09:47:19 +0000 Subject: [PATCH 31/99] Doc updates for deque [SVN r77984] --- doc/container.qbk | 183 ++++++++++++++-------------------------------- 1 file changed, 53 insertions(+), 130 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 51ad2230..7e294ee4 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -96,7 +96,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified]]] + [[`T0`...`TN`] [Element types] [__unspecified__]] ] [heading Model of] @@ -157,7 +157,7 @@ time). The runtime cost of access to each element is peculiarly constant [table [[Parameter] [Description] [Default]] - [[`Car`] [Head type] []] + [[`Car`] [Head type] [ ]] [[`Cdr`] [Tail type] [`nil`]] ] @@ -247,7 +247,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] + [[`T0`...`TN`] [Element types] [__unspecified__]] ] [heading Model of] @@ -312,20 +312,16 @@ __front_extended_deque__ and __back_extended_deque__. #include #include -[heading C++03 Synopsis] +[heading Synopsis] - template < - typename T0 = __unspecified__ - , typename T1 = __unspecified__ - , typename T2 = __unspecified__ - ... - , typename TN = __unspecified__ - > + template struct deque; -The variadic class interface accepts `0` to `FUSION_MAX_DEQUE_SIZE` -elements, where `FUSION_MAX_DEQUE_SIZE` is a user definable predefined -maximum that defaults to `10`. Example: +For C++11 compilers, the variadic class interface has no upper bound. + +For C++03 compilers, the variadic class interface accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. Example: deque @@ -334,25 +330,11 @@ including any Fusion header to change the default. Example: #define FUSION_MAX_DEQUE_SIZE 20 -[heading C++03 Template parameters] +[heading Template parameters] [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] -] - -[heading C++11 Synopsis] - - template - struct deque; - -For C++11 compilers, the variadic class interface has no upper bound. - -[heading C++11 Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Elements`] [Element types] [[]]] + [[`Elements`] [Element types] [ ]] ] [heading Model of] @@ -420,11 +402,11 @@ the same properties as the __deque__. [table [[Parameter] [Description] [Default]] - [[`Deque`] [Deque type] []] - [[`T`] [Element type] []] + [[`Deque`] [Deque type] [ ]] + [[`T`] [Element type] [ ]] ] -[`Deque` can be a __deque__, a __front_extended_deque__ or a +[blurb __note__ `Deque` can be a __deque__, a __front_extended_deque__ or a __back_extended_deque__] [heading Model of] @@ -481,11 +463,11 @@ the same properties as the __deque__. [table [[Parameter] [Description] [Default]] - [[`Deque`] [Deque type] []] - [[`T`] [Element type] []] + [[`Deque`] [Deque type] [ ]] + [[`T`] [Element type] [ ]] ] -[`Deque` can be a __deque__, a __back_extended_deque__ or a +[blurb __note__ `Deque` can be a __deque__, a __back_extended_deque__ or a __back_extended_deque__] [heading Model of] @@ -565,7 +547,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] + [[`T0`...`TN`] [Element types] [__unspecified__]] ] [heading Model of] @@ -647,7 +629,7 @@ including any Fusion header to change the default. Example: [table [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [[`unspecified-type`]]] + [[`T0`...`TN`] [Element types] [__unspecified__]] ] [heading Model of] @@ -856,35 +838,7 @@ __note_boost_ref__ Create a __deque__ from one or more values. -[heading C++03 Synopsis] - - template - typename __result_of_make_deque__::type - make_deque(T0 const& x0, T1 const& x1... TN const& xN); - -The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where -`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults -to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_DEQUE_SIZE 20 - -[heading C++03 Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_deque`]] -] - -[heading C++03 Expression Semantics] - - make_deque(x0, x1,... xN); - -[*Return type]: __result_of_make_deque__`::type` - -[*Semantics]: Create a __deque__ from `x0, x1,... xN`. - -[heading C++11 Synopsis] +[heading Synopsis] template typename __result_of_make_deque__::type @@ -892,14 +846,22 @@ before including any Fusion header to change the default. Example: For C++11 compilers, the variadic function interface has no upper bound. -[heading C++11 Parameters] +For C++11 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] [table [[Parameter] [Description] [Description]] [[`elements`] [Instances of `Elements`] [The arguments to `make_deque`]] ] -[heading C++11 Expression Semantics] +[heading Expression Semantics] make_deque(elements...); @@ -1226,35 +1188,7 @@ including any Fusion header to change the default. Example: Constructs a tie using a __deque__ sequence. -[heading C++03 Synopsis] - - template - __deque__ - deque_tie(T0& x0, T1& x1... TN& xN); - -The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where -`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults -to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_DEQUE_SIZE 20 - -[heading C++03 Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `deque_tie`]] -] - -[heading C++03 Expression Semantics] - - deque_tie(x0, x1,... xN); - -[*Return type]: __deque__ - -[*Semantics]: Create a __deque__ of references from `x0, x1,... xN`. - -[heading C++11 Synopsis] +[heading Synopsis] template __deque__ @@ -1262,14 +1196,22 @@ before including any Fusion header to change the default. Example: For C++11 compilers, the variadic function interface has no upper bound. -[heading C++11 Parameters] +For C++03 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] [table [[Parameter] [Description] [Description]] [[`elements`] [Instances of `Elements`] [The arguments to `deque_tie`]] ] -[heading C++11 Expression Semantics] +[heading Expression Semantics] deque_tie(elements...); @@ -1690,48 +1632,29 @@ default. Example: Returns the result type of __deque_tie__. -[heading C++03 Synopsis] - - template - struct deque_tie; - -The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where -`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults -to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_DEQUE_SIZE 20 - -[heading C++03 Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [The arguments to `deque_tie`]] -] - -[heading C++03 Expression Semantics] - - result_of::deque_tie::type; - -[*Return type]: __deque__ - -[*Semantics]: Create a __deque__ of references from `T0, T1,... TN`. - -[heading C++11 Synopsis] +[heading Synopsis] template struct deque_tie; For C++11 compilers, the variadic template interface has no upper bound. -[heading C++11 Parameters] +For C++03 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] [table [[Parameter] [Requirement] [Description]] [[`Elements`] [Variadic template types] [Template arguments to `deque_tie`]] ] -[heading C++11 Expression Semantics] +[heading Expression Semantics] result_of::deque_tie::type; From c8224c8bdfc5e96a85a4e531ff1fa681af24873c Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Wed, 18 Apr 2012 01:18:10 +0000 Subject: [PATCH 32/99] deque fix for ambiguity and making ctors explicit [SVN r78056] --- include/boost/fusion/container/deque/cpp11_deque.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/boost/fusion/container/deque/cpp11_deque.hpp b/include/boost/fusion/container/deque/cpp11_deque.hpp index bcb6c6c8..f4f645ae 100644 --- a/include/boost/fusion/container/deque/cpp11_deque.hpp +++ b/include/boost/fusion/container/deque/cpp11_deque.hpp @@ -31,7 +31,9 @@ namespace boost { namespace fusion struct deque_tag; template - struct deque; + struct deque : detail::nil_keyed_element + { + }; template struct deque @@ -49,22 +51,18 @@ namespace boost { namespace fusion deque() {} - explicit deque(typename add_reference::type>::type elem) - : base(elem, detail::nil_keyed_element()) - {} - template deque(deque const& seq) : base(seq) {} - deque(typename add_reference::type>::type head + explicit deque(typename add_reference::type>::type head , typename add_reference::type>::type... tail) : base(detail::deque_keyed_values::call(head, tail...)) {} template - deque(Sequence const& seq + explicit deque(Sequence const& seq , typename disable_if >::type* /*dummy*/ = 0) : base(base::from_iterator(fusion::begin(seq))) {} From 01f002f0847ffde9a65e56854d8dee8a99eec879 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Wed, 18 Apr 2012 02:57:56 +0000 Subject: [PATCH 33/99] tweaked cref_result and ref_result to be non-lazy (for consistency). [SVN r78058] --- .../fusion/adapted/std_tuple/detail/at_impl.hpp | 10 +++++----- .../adapted/std_tuple/std_tuple_iterator.hpp | 10 +++++----- .../boost/fusion/container/deque/cpp11_deque.hpp | 5 +++-- .../container/deque/detail/keyed_element.hpp | 14 ++++---------- .../boost/fusion/container/list/detail/at_impl.hpp | 12 ++++++------ .../boost/fusion/container/map/detail/at_impl.hpp | 10 +++++++--- .../container/map/detail/deref_data_impl.hpp | 9 ++++----- .../fusion/container/vector/detail/at_impl.hpp | 4 ++-- .../fusion/container/vector/detail/deref_impl.hpp | 9 +++++---- include/boost/fusion/support/detail/access.hpp | 12 ++++++------ 10 files changed, 47 insertions(+), 48 deletions(-) diff --git a/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp b/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp index 2f09719c..400f366e 100644 --- a/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp +++ b/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include @@ -29,13 +29,13 @@ namespace boost { namespace fusion struct apply { typedef typename remove_const::type seq_type; - typedef std::tuple_element element; + typedef typename std::tuple_element::type element; typedef typename - mpl::eval_if< + mpl::if_< is_const - , fusion::detail::cref_result - , fusion::detail::ref_result + , typename fusion::detail::cref_result::type + , typename fusion::detail::ref_result::type >::type type; diff --git a/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp b/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp index 4998e21d..082018a4 100644 --- a/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp +++ b/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -48,12 +48,12 @@ namespace boost { namespace fusion template struct deref { - typedef value_of element; + typedef typename value_of::type element; typedef typename - mpl::eval_if< + mpl::if_< is_const - , fusion::detail::cref_result - , fusion::detail::ref_result + , typename fusion::detail::cref_result::type + , typename fusion::detail::ref_result::type >::type type; diff --git a/include/boost/fusion/container/deque/cpp11_deque.hpp b/include/boost/fusion/container/deque/cpp11_deque.hpp index f4f645ae..23f3e9a8 100644 --- a/include/boost/fusion/container/deque/cpp11_deque.hpp +++ b/include/boost/fusion/container/deque/cpp11_deque.hpp @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -56,8 +57,8 @@ namespace boost { namespace fusion : base(seq) {} - explicit deque(typename add_reference::type>::type head - , typename add_reference::type>::type... tail) + explicit deque(typename detail::call_param::type head + , typename detail::call_param::type... tail) : base(detail::deque_keyed_values::call(head, tail...)) {} diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index e158096b..d1b219de 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -8,9 +8,7 @@ #if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330) #define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330 -#include -#include - +#include #include #include @@ -39,10 +37,6 @@ namespace boost { namespace fusion { namespace detail { typedef Rest base; typedef fusion_sequence_tag tag; - typedef typename - add_reference::type>::type - const_value_type; - typedef typename add_reference::type value_type; using Rest::get; template @@ -63,17 +57,17 @@ namespace boost { namespace fusion { namespace detail return *this; } - const_value_type get(Key) const + typename cref_result::type get(Key) const { return value_; } - value_type get(Key) + typename ref_result::type get(Key) { return value_; } - keyed_element(const_value_type value, Rest const& rest) + keyed_element(typename call_param::type value, Rest const& rest) : Rest(rest), value_(value) {} diff --git a/include/boost/fusion/container/list/detail/at_impl.hpp b/include/boost/fusion/container/list/detail/at_impl.hpp index 145f8aa5..75746392 100644 --- a/include/boost/fusion/container/list/detail/at_impl.hpp +++ b/include/boost/fusion/container/list/detail/at_impl.hpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include namespace boost { namespace fusion @@ -93,15 +93,15 @@ namespace boost { namespace fusion template struct apply { - typedef detail::cons_deref< - typename detail::cons_advance::type> + typedef typename detail::cons_deref< + typename detail::cons_advance::type>::type element; typedef typename - mpl::eval_if< + mpl::if_< is_const - , detail::cref_result - , detail::ref_result + , typename detail::cref_result::type + , typename detail::ref_result::type >::type type; diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp index f871bee0..025c1724 100644 --- a/include/boost/fusion/container/map/detail/at_impl.hpp +++ b/include/boost/fusion/container/map/detail/at_impl.hpp @@ -28,7 +28,9 @@ namespace boost { namespace fusion template struct apply { - typedef mpl::at element; + typedef typename + mpl::at::type + element; typedef typename detail::ref_result::type type; static type @@ -39,9 +41,11 @@ namespace boost { namespace fusion }; template - struct apply + struct apply { - typedef mpl::at element; + typedef typename + mpl::at::type + element; typedef typename detail::cref_result::type type; static type diff --git a/include/boost/fusion/container/map/detail/deref_data_impl.hpp b/include/boost/fusion/container/map/detail/deref_data_impl.hpp index 07087a39..8304c898 100644 --- a/include/boost/fusion/container/map/detail/deref_data_impl.hpp +++ b/include/boost/fusion/container/map/detail/deref_data_impl.hpp @@ -12,8 +12,7 @@ #include #include #include -#include -#include +#include namespace boost { namespace fusion { namespace extension { @@ -29,10 +28,10 @@ namespace boost { namespace fusion { namespace extension typedef typename result_of::value_of::type::second_type data; typedef typename - mpl::eval_if< + mpl::if_< is_const - , detail::cref_result > - , detail::ref_result > + , typename detail::cref_result::type + , typename detail::ref_result::type >::type type; diff --git a/include/boost/fusion/container/vector/detail/at_impl.hpp b/include/boost/fusion/container/vector/detail/at_impl.hpp index 0a006dc3..0017d9c8 100644 --- a/include/boost/fusion/container/vector/detail/at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/at_impl.hpp @@ -27,7 +27,7 @@ namespace boost { namespace fusion template struct apply { - typedef mpl::at element; + typedef typename mpl::at::type element; typedef typename detail::ref_result::type type; static type @@ -40,7 +40,7 @@ namespace boost { namespace fusion template struct apply { - typedef mpl::at element; + typedef typename mpl::at::type element; typedef typename detail::cref_result::type type; static type diff --git a/include/boost/fusion/container/vector/detail/deref_impl.hpp b/include/boost/fusion/container/vector/detail/deref_impl.hpp index 1d9ac4a8..8c5fb942 100644 --- a/include/boost/fusion/container/vector/detail/deref_impl.hpp +++ b/include/boost/fusion/container/vector/detail/deref_impl.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace boost { namespace fusion { @@ -29,14 +30,14 @@ namespace boost { namespace fusion typedef typename Iterator::vector vector; typedef typename Iterator::index index; typedef typename mpl::at< - typename vector::types, index> + typename vector::types, index>::type element; typedef typename - mpl::eval_if< + mpl::if_< is_const - , fusion::detail::cref_result - , fusion::detail::ref_result + , typename fusion::detail::cref_result::type + , typename fusion::detail::ref_result::type >::type type; diff --git a/include/boost/fusion/support/detail/access.hpp b/include/boost/fusion/support/detail/access.hpp index 03c9c319..cb00c308 100644 --- a/include/boost/fusion/support/detail/access.hpp +++ b/include/boost/fusion/support/detail/access.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(FUSION_ACCESS_04182005_0737) @@ -15,16 +15,16 @@ namespace boost { namespace fusion { namespace detail template struct ref_result { - typedef typename add_reference::type type; + typedef typename add_reference::type type; }; template struct cref_result { - typedef typename + typedef typename add_reference< - typename add_const::type - >::type + typename add_const::type + >::type type; }; @@ -35,7 +35,7 @@ namespace boost { namespace fusion { namespace detail }; template - struct call_param + struct call_param { typedef T& type; }; From fad4a7ebeb0a2e16de226f25dcd6e72d9976f455 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 21 Apr 2012 06:09:54 +0000 Subject: [PATCH 34/99] rearranging files [SVN r78106] --- .../fusion/container/deque/cpp11_deque.hpp | 87 ------------------- .../container/deque/cpp11_deque_fwd.hpp | 19 ---- .../boost/fusion/container/deque/deque.hpp | 84 +++++++++++++++++- .../fusion/container/deque/deque_fwd.hpp | 17 +++- .../deque/{ => detail}/cpp03_deque.hpp | 0 .../deque/{ => detail}/cpp03_deque_fwd.hpp | 0 .../deque/detail/cpp11_deque_keyed_values.hpp | 4 +- 7 files changed, 97 insertions(+), 114 deletions(-) delete mode 100644 include/boost/fusion/container/deque/cpp11_deque.hpp delete mode 100644 include/boost/fusion/container/deque/cpp11_deque_fwd.hpp rename include/boost/fusion/container/deque/{ => detail}/cpp03_deque.hpp (100%) rename include/boost/fusion/container/deque/{ => detail}/cpp03_deque_fwd.hpp (100%) diff --git a/include/boost/fusion/container/deque/cpp11_deque.hpp b/include/boost/fusion/container/deque/cpp11_deque.hpp deleted file mode 100644 index 23f3e9a8..00000000 --- a/include/boost/fusion/container/deque/cpp11_deque.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2012 Joel de Guzman - Copyright (c) 2005-2006 Dan Marsden - - 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(BOOST_CPP03_FUSION_DEQUE_26112006_1649) -#define BOOST_CPP03_FUSION_DEQUE_26112006_1649 - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace boost { namespace fusion -{ - struct deque_tag; - - template - struct deque : detail::nil_keyed_element - { - }; - - template - struct deque - : detail::deque_keyed_values::type - , sequence_base> - { - typedef deque_tag fusion_tag; - typedef bidirectional_traversal_tag category; - typedef typename detail::deque_keyed_values::type base; - typedef mpl::int_<(sizeof ...(Tail) + 1)> size; - typedef mpl::int_ next_up; - typedef mpl::int_::type::value> next_down; - typedef mpl::false_ is_view; - - deque() - {} - - template - deque(deque const& seq) - : base(seq) - {} - - explicit deque(typename detail::call_param::type head - , typename detail::call_param::type... tail) - : base(detail::deque_keyed_values::call(head, tail...)) - {} - - template - explicit deque(Sequence const& seq - , typename disable_if >::type* /*dummy*/ = 0) - : base(base::from_iterator(fusion::begin(seq))) - {} - - template - deque& operator=(deque const& rhs) - { - base::operator=(rhs); - return *this; - } - - template - deque& operator=(T const& rhs) - { - base::operator=(rhs); - return *this; - } - }; -}} - -#endif diff --git a/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp b/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp deleted file mode 100644 index 420fe611..00000000 --- a/include/boost/fusion/container/deque/cpp11_deque_fwd.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2012 Joel de Guzman - Copyright (c) 2005-2007 Dan Marsden - - 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(FUSION_CPP11_DEQUE_FORWARD_04072012_0355) -#define FUSION_CPP11_DEQUE_FORWARD_04072012_0355 - -namespace boost { namespace fusion -{ - struct void_; - - template - struct deque; -}} - -#endif diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 0a3353b7..215981e4 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -10,15 +10,93 @@ #include +/////////////////////////////////////////////////////////////////////////////// +// With no decltype and variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// #if (defined(BOOST_NO_DECLTYPE) \ || defined(BOOST_NO_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_RVALUE_REFERENCES)) -# include +# include #else # if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) # define BOOST_FUSION_HAS_CPP11_DEQUE # endif -# include -#endif + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct deque_tag; + + template + struct deque : detail::nil_keyed_element + { + }; + + template + struct deque + : detail::deque_keyed_values::type + , sequence_base> + { + typedef deque_tag fusion_tag; + typedef bidirectional_traversal_tag category; + typedef typename detail::deque_keyed_values::type base; + typedef mpl::int_<(sizeof ...(Tail) + 1)> size; + typedef mpl::int_ next_up; + typedef mpl::int_::type::value> next_down; + typedef mpl::false_ is_view; + + deque() + {} + + template + deque(deque const& seq) + : base(seq) + {} + + explicit deque(typename detail::call_param::type head + , typename detail::call_param::type... tail) + : base(detail::deque_keyed_values::call(head, tail...)) + {} + + template + explicit deque(Sequence const& seq + , typename disable_if >::type* /*dummy*/ = 0) + : base(base::from_iterator(fusion::begin(seq))) + {} + + template + deque& operator=(deque const& rhs) + { + base::operator=(rhs); + return *this; + } + + template + deque& operator=(T const& rhs) + { + base::operator=(rhs); + return *this; + } + }; +}} #endif +#endif diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index d1696936..19ca8f8f 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -10,15 +10,26 @@ #include +/////////////////////////////////////////////////////////////////////////////// +// With no decltype and variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// #if (defined(BOOST_NO_DECLTYPE) \ || defined(BOOST_NO_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_RVALUE_REFERENCES)) -# include +# include #else # if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) # define BOOST_FUSION_HAS_CPP11_DEQUE # endif -# include -#endif + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace fusion +{ + template + struct deque; +}} #endif +#endif diff --git a/include/boost/fusion/container/deque/cpp03_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp similarity index 100% rename from include/boost/fusion/container/deque/cpp03_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03_deque.hpp diff --git a/include/boost/fusion/container/deque/cpp03_deque_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/cpp03_deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp index e8ae0fa1..43ed5360 100644 --- a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp @@ -29,8 +29,8 @@ namespace boost { namespace fusion { namespace detail typedef keyed_element type; static type call( - typename add_reference::type>::type head - , typename add_reference::type>::type... tail) + typename detail::call_param::type head + , typename detail::call_param::type... tail) { return type( head From 654dfbedb85e159ce672689e807a63876cd28134 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 24 Apr 2012 01:39:43 +0000 Subject: [PATCH 35/99] patch for clang from Michel Morin [SVN r78175] --- test/sequence/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequence/io.cpp b/test/sequence/io.cpp index 00e88b13..74e0f30c 100644 --- a/test/sequence/io.cpp +++ b/test/sequence/io.cpp @@ -103,7 +103,7 @@ main() useThisIStringStream is("(100 200 300)"); vector ti; - BOOST_TEST(bool((is >> ti) != 0)); + BOOST_TEST(bool(is >> ti) != 0); BOOST_TEST(ti == make_vector(100, 200, 300)); // Note that strings are problematic: From 524769f6fbafede6858ca8afbe3687b1f6cee9f1 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 24 Apr 2012 01:40:17 +0000 Subject: [PATCH 36/99] patch for clang from Michel Morin [SVN r78176] --- include/boost/fusion/adapted/std_tuple/tag_of.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/boost/fusion/adapted/std_tuple/tag_of.hpp b/include/boost/fusion/adapted/std_tuple/tag_of.hpp index 10e2e181..6d7b4d6f 100644 --- a/include/boost/fusion/adapted/std_tuple/tag_of.hpp +++ b/include/boost/fusion/adapted/std_tuple/tag_of.hpp @@ -10,12 +10,6 @@ #include #include -namespace std -{ - template - class tuple; -} - namespace boost { namespace fusion { struct std_tuple_tag; From 66e8a6d3b7d3c85adee33e8bb7b88bf1c3b73999 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 26 Apr 2012 00:03:42 +0000 Subject: [PATCH 37/99] Doc updates for deque [SVN r78199] --- doc/container.qbk | 122 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 91 insertions(+), 31 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 7e294ee4..fb4fd8f5 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1372,49 +1372,29 @@ rules for __element_conversion__. Returns the result type of __make_deque__. -[heading C++03 Synopsis] - - template - struct make_deque; - -The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` elements, where -`FUSION_MAX_DEQUE_SIZE` is a user definable predefined maximum that defaults -to `10`. You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_DEQUE_SIZE 20 - -[heading C++03 Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [Template arguments to `make_deque`]] -] - -[heading C++03 Expression Semantics] - - result_of::make_deque::type - -[*Return type]: A __deque__ with elements of types converted following the -rules for __element_conversion__. - -[*Semantics]: Create a __deque__ from `T0, T1,... TN`. - -[heading C++11 Synopsis] +[heading Synopsis] template struct make_deque; For C++11 compilers, the variadic template interface has no upper bound. -[heading C++11 Parameters] +For C++03 The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` +elements, where `FUSION_MAX_DEQUE_SIZE` is a user definable predefined +maximum that defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_DEQUE_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] [table [[Parameter] [Requirement] [Description]] [[`Elements`] [Variadic template types] [Template arguments to `make_deque`]] ] -[heading C++11 Expression Semantics] +[heading Expression Semantics] result_of::make_deque::type @@ -1821,6 +1801,48 @@ Convert a fusion sequence to a __vector__. [endsect] +[section as_deque] + +[heading Description] + +Convert a fusion sequence to a __deque__. + +[heading Synopsis] + + template + typename result_of::as_deque::type + as_deque(Sequence& seq); + + template + typename result_of::as_deque::type + as_deque(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_deque(seq); + +[*Return type]: __result_of_as_deque__`::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __deque__. + +[heading Header] + + #include + #include + +[heading Example] + + as_deque(__make_vector__('x', 123, "hello")) + +[endsect] + [section as_set] [heading Description] @@ -1992,6 +2014,44 @@ Returns the result type of __as_vector__. [endsect] +[section as_deque] + +[heading Description] + +Returns the result type of __as_deque__. + +[heading Synopsis] + + template + struct as_deque; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]] +] + +[heading Expression Semantics] + + result_of::as_deque::type; + +[*Return type]: A __deque__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __deque__. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::as_deque<__vector__ >::type + +[endsect] + [section as_set] [heading Description] From b63c8214d73dab3d2c9c92a9bfbd43b6de5f49a7 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 14 May 2012 00:37:21 +0000 Subject: [PATCH 38/99] Patches from Nathan Ridge using SFINAE to disable the Fusion algorithms for non-{Fusion sequence} types [SVN r78463] --- .../boost/fusion/algorithm/auxiliary/copy.hpp | 13 ++++++- .../fusion/algorithm/iteration/accumulate.hpp | 16 +++++++-- .../algorithm/iteration/accumulate_fwd.hpp | 15 ++++++-- .../fusion/algorithm/iteration/for_each.hpp | 16 +++++++-- .../algorithm/iteration/for_each_fwd.hpp | 17 +++++++-- .../boost/fusion/algorithm/query/count.hpp | 9 ++++- .../boost/fusion/algorithm/query/count_if.hpp | 9 ++++- .../fusion/algorithm/transformation/erase.hpp | 35 ++++++++++++++++--- .../algorithm/transformation/insert.hpp | 10 ++++-- .../algorithm/transformation/push_back.hpp | 9 ++++- .../algorithm/transformation/push_front.hpp | 9 ++++- .../algorithm/transformation/replace.hpp | 9 ++++- .../algorithm/transformation/replace_if.hpp | 8 ++++- .../algorithm/transformation/reverse.hpp | 9 ++++- .../detail/segmented_iterator_range.hpp | 14 ++++++-- 15 files changed, 174 insertions(+), 24 deletions(-) diff --git a/include/boost/fusion/algorithm/auxiliary/copy.hpp b/include/boost/fusion/algorithm/auxiliary/copy.hpp index 2720627c..fd866468 100644 --- a/include/boost/fusion/algorithm/auxiliary/copy.hpp +++ b/include/boost/fusion/algorithm/auxiliary/copy.hpp @@ -11,8 +11,11 @@ #include #include #include +#include #include #include +#include +#include #if defined (BOOST_MSVC) # pragma warning(push) @@ -54,7 +57,15 @@ namespace boost { namespace fusion } template - inline void + inline + typename + enable_if_c< + type_traits::ice_and< + traits::is_sequence::value + , traits::is_sequence::value + >::value, + void + >::type copy(Seq1 const& src, Seq2& dest) { BOOST_STATIC_ASSERT( diff --git a/include/boost/fusion/algorithm/iteration/accumulate.hpp b/include/boost/fusion/algorithm/iteration/accumulate.hpp index a8d6a357..4b676dea 100644 --- a/include/boost/fusion/algorithm/iteration/accumulate.hpp +++ b/include/boost/fusion/algorithm/iteration/accumulate.hpp @@ -9,6 +9,8 @@ #include #include +#include +#include namespace boost { namespace fusion { @@ -23,14 +25,24 @@ namespace boost { namespace fusion } template - inline typename result_of::accumulate::type + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::accumulate + >::type accumulate(Sequence& seq, State const& state, F f) { return fusion::fold(seq, state, f); } template - inline typename result_of::accumulate::type + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::accumulate + >::type accumulate(Sequence const& seq, State const& state, F f) { return fusion::fold(seq, state, f); diff --git a/include/boost/fusion/algorithm/iteration/accumulate_fwd.hpp b/include/boost/fusion/algorithm/iteration/accumulate_fwd.hpp index 9c0bd115..a4ca316c 100644 --- a/include/boost/fusion/algorithm/iteration/accumulate_fwd.hpp +++ b/include/boost/fusion/algorithm/iteration/accumulate_fwd.hpp @@ -7,6 +7,9 @@ #if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED) #define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED +#include +#include + namespace boost { namespace fusion { namespace result_of @@ -16,11 +19,19 @@ namespace boost { namespace fusion } template - typename result_of::accumulate::type + typename + lazy_enable_if< + traits::is_sequence + , result_of::accumulate + >::type accumulate(Sequence& seq, State const& state, F f); template - typename result_of::accumulate::type + typename + lazy_enable_if< + traits::is_sequence + , result_of::accumulate + >::type accumulate(Sequence const& seq, State const& state, F f); }} diff --git a/include/boost/fusion/algorithm/iteration/for_each.hpp b/include/boost/fusion/algorithm/iteration/for_each.hpp index ab8b8f0e..17cde34a 100644 --- a/include/boost/fusion/algorithm/iteration/for_each.hpp +++ b/include/boost/fusion/algorithm/iteration/for_each.hpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include namespace boost { namespace fusion { @@ -24,14 +26,24 @@ namespace boost { namespace fusion } template - inline void + inline + typename + enable_if< + traits::is_sequence + , void + >::type for_each(Sequence& seq, F const& f) { detail::for_each(seq, f, typename traits::is_segmented::type()); } template - inline void + inline + typename + enable_if< + traits::is_sequence + , void + >::type for_each(Sequence const& seq, F const& f) { detail::for_each(seq, f, typename traits::is_segmented::type()); diff --git a/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp b/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp index 544915d9..b757873e 100644 --- a/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp +++ b/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp @@ -7,6 +7,9 @@ #if !defined(BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED) #define BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED +#include +#include + namespace boost { namespace fusion { namespace result_of @@ -16,11 +19,21 @@ namespace boost { namespace fusion } template - void + inline + typename + enable_if< + traits::is_sequence + , void + >::type for_each(Sequence& seq, F const& f); template - void + inline + typename + enable_if< + traits::is_sequence + , void + >::type for_each(Sequence const& seq, F const& f); }} diff --git a/include/boost/fusion/algorithm/query/count.hpp b/include/boost/fusion/algorithm/query/count.hpp index ade58671..04887163 100644 --- a/include/boost/fusion/algorithm/query/count.hpp +++ b/include/boost/fusion/algorithm/query/count.hpp @@ -10,6 +10,8 @@ #include #include +#include +#include namespace boost { namespace fusion { @@ -23,7 +25,12 @@ namespace boost { namespace fusion } template - inline int + inline + typename + enable_if< + traits::is_sequence + , int + >::type count(Sequence const& seq, T const& x) { detail::count_compare f(x); diff --git a/include/boost/fusion/algorithm/query/count_if.hpp b/include/boost/fusion/algorithm/query/count_if.hpp index 51112cf0..79297973 100644 --- a/include/boost/fusion/algorithm/query/count_if.hpp +++ b/include/boost/fusion/algorithm/query/count_if.hpp @@ -10,6 +10,8 @@ #include #include +#include +#include namespace boost { namespace fusion { @@ -23,7 +25,12 @@ namespace boost { namespace fusion } template - inline int + inline + typename + enable_if< + traits::is_sequence + , int + >::type count_if(Sequence const& seq, F f) { return detail::count_if( diff --git a/include/boost/fusion/algorithm/transformation/erase.hpp b/include/boost/fusion/algorithm/transformation/erase.hpp index 304ed4c5..6ad737fd 100644 --- a/include/boost/fusion/algorithm/transformation/erase.hpp +++ b/include/boost/fusion/algorithm/transformation/erase.hpp @@ -16,6 +16,9 @@ #include #include #include +#include +#include +#include namespace boost { namespace fusion { @@ -53,18 +56,38 @@ namespace boost { namespace fusion } }; + struct use_default; + + template + struct fusion_default_help + : mpl::if_< + is_same + , Default + , T + > + { + }; + template < typename Sequence , typename First - , typename Last = typename compute_erase_last::type> + , typename Last = use_default> struct erase { typedef typename result_of::begin::type seq_first_type; typedef typename result_of::end::type seq_last_type; BOOST_STATIC_ASSERT((!result_of::equal_to::value)); - typedef typename convert_iterator::type first_type; - typedef typename convert_iterator::type last_type; + typedef First FirstType; + typedef typename + fusion_default_help< + Last + , typename compute_erase_last::type + >::type + LastType; + + typedef typename convert_iterator::type first_type; + typedef typename convert_iterator::type last_type; typedef iterator_range left_type; typedef iterator_range right_type; typedef joint_view type; @@ -72,7 +95,11 @@ namespace boost { namespace fusion } template - typename result_of::erase::type + typename + lazy_enable_if< + traits::is_sequence + , typename result_of::erase + >::type erase(Sequence const& seq, First const& first) { typedef result_of::erase result_of; diff --git a/include/boost/fusion/algorithm/transformation/insert.hpp b/include/boost/fusion/algorithm/transformation/insert.hpp index ac5bca38..2052fc01 100644 --- a/include/boost/fusion/algorithm/transformation/insert.hpp +++ b/include/boost/fusion/algorithm/transformation/insert.hpp @@ -16,6 +16,8 @@ #include #include #include +#include +#include namespace boost { namespace fusion { @@ -38,8 +40,12 @@ namespace boost { namespace fusion } template - inline typename result_of::insert< - Sequence const, Position, T>::type + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::insert + >::type insert(Sequence const& seq, Position const& pos, T const& x) { typedef result_of::insert< diff --git a/include/boost/fusion/algorithm/transformation/push_back.hpp b/include/boost/fusion/algorithm/transformation/push_back.hpp index 00a01a80..9afe538a 100644 --- a/include/boost/fusion/algorithm/transformation/push_back.hpp +++ b/include/boost/fusion/algorithm/transformation/push_back.hpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include namespace boost { namespace fusion { @@ -24,7 +26,12 @@ namespace boost { namespace fusion } template - inline typename result_of::push_back::type + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::push_back + >::type push_back(Sequence const& seq, T const& x) { typedef typename result_of::push_back push_back; diff --git a/include/boost/fusion/algorithm/transformation/push_front.hpp b/include/boost/fusion/algorithm/transformation/push_front.hpp index d08ad279..abe7faad 100644 --- a/include/boost/fusion/algorithm/transformation/push_front.hpp +++ b/include/boost/fusion/algorithm/transformation/push_front.hpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include namespace boost { namespace fusion { @@ -24,7 +26,12 @@ namespace boost { namespace fusion } template - inline typename result_of::push_front::type + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::push_front + >::type push_front(Sequence const& seq, T const& x) { typedef typename result_of::push_front push_front; diff --git a/include/boost/fusion/algorithm/transformation/replace.hpp b/include/boost/fusion/algorithm/transformation/replace.hpp index bfe186e5..a92e6e37 100644 --- a/include/boost/fusion/algorithm/transformation/replace.hpp +++ b/include/boost/fusion/algorithm/transformation/replace.hpp @@ -9,6 +9,8 @@ #include #include +#include +#include namespace boost { namespace fusion { @@ -22,7 +24,12 @@ namespace boost { namespace fusion } template - inline typename result_of::replace::type + inline + typename + enable_if< + traits::is_sequence + , typename result_of::replace::type + >::type replace(Sequence const& seq, T const& old_value, T const& new_value) { typedef typename result_of::replace::type result; diff --git a/include/boost/fusion/algorithm/transformation/replace_if.hpp b/include/boost/fusion/algorithm/transformation/replace_if.hpp index 29913436..39b9009a 100644 --- a/include/boost/fusion/algorithm/transformation/replace_if.hpp +++ b/include/boost/fusion/algorithm/transformation/replace_if.hpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -24,7 +25,12 @@ namespace boost { namespace fusion } template - inline typename result_of::replace_if::type + inline + typename + enable_if< + traits::is_sequence + , typename result_of::replace_if::type + >::type replace_if(Sequence const& seq, F pred, T const& new_value) { typedef typename result_of::replace_if::type result; diff --git a/include/boost/fusion/algorithm/transformation/reverse.hpp b/include/boost/fusion/algorithm/transformation/reverse.hpp index 23c4fe65..923b90fc 100644 --- a/include/boost/fusion/algorithm/transformation/reverse.hpp +++ b/include/boost/fusion/algorithm/transformation/reverse.hpp @@ -8,6 +8,8 @@ #define FUSION_REVERSE_07212005_1230 #include +#include +#include namespace boost { namespace fusion { @@ -21,7 +23,12 @@ namespace boost { namespace fusion } template - inline reverse_view + inline + typename + enable_if< + traits::is_sequence + , reverse_view + >::type reverse(Sequence const& view) { return reverse_view(view); diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index 489d9553..9bf459c4 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -21,6 +21,8 @@ #include #include #include +#include +#include // Invariants: // - Each segmented iterator has a stack @@ -45,11 +47,19 @@ namespace boost { namespace fusion } template - typename result_of::push_back::type + typename + lazy_enable_if< + traits::is_sequence + , result_of::push_back + >::type push_back(Sequence const& seq, T const& x); template - typename result_of::push_front::type + typename + lazy_enable_if< + traits::is_sequence + , result_of::push_front + >::type push_front(Sequence const& seq, T const& x); }} From 51ade6529c69593c088cc2ac6309a99f3134fa71 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 14 May 2012 00:41:42 +0000 Subject: [PATCH 39/99] typo fix by Mario Lang [SVN r78464] --- doc/adapted.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/adapted.qbk b/doc/adapted.qbk index 47e538c5..7d07a6d8 100644 --- a/doc/adapted.qbk +++ b/doc/adapted.qbk @@ -658,7 +658,7 @@ __random_access_sequence__. [heading Synopsis] - BOOST_FUSION_ADAPT_ADT( + BOOST_FUSION_ADAPT_TPL_ADT( (template_param0)(template_param1)..., (type_name) (specialization_param0)(specialization_param1)..., (attribute_type0, attribute_const_type0, get_expr0, set_expr0) From 8ce40ebd0c37c8a7b70c7bf575e9385577d80582 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 17 May 2012 01:10:20 +0000 Subject: [PATCH 40/99] Patch by Nathan Ridge to allow BOOST_FUSION_ADAPT_ADT adapted classes to be compared using relational operators. [SVN r78490] --- .../fusion/adapted/adt/detail/extension.hpp | 29 ++++++++++++++----- .../sequence/comparison/detail/equal_to.hpp | 3 +- .../sequence/comparison/detail/greater.hpp | 6 ++-- .../comparison/detail/greater_equal.hpp | 6 ++-- .../sequence/comparison/detail/less.hpp | 6 ++-- .../sequence/comparison/detail/less_equal.hpp | 6 ++-- .../comparison/detail/not_equal_to.hpp | 3 +- include/boost/fusion/support.hpp | 1 + include/boost/fusion/support/as_const.hpp | 26 +++++++++++++++++ 9 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 include/boost/fusion/support/as_const.hpp diff --git a/include/boost/fusion/adapted/adt/detail/extension.hpp b/include/boost/fusion/adapted/adt/detail/extension.hpp index 50c40cf3..0a43ffca 100644 --- a/include/boost/fusion/adapted/adt/detail/extension.hpp +++ b/include/boost/fusion/adapted/adt/detail/extension.hpp @@ -12,13 +12,28 @@ #include #include +#include +#include -namespace boost { namespace fusion { namespace detail -{ - template - struct get_identity - : remove_const::type> - {}; -}}} +namespace boost { namespace fusion +{ + namespace detail + { + template + struct get_identity + : remove_const::type> + {}; + } + + namespace extension + { + // Overload as_const() to unwrap adt_attribute_proxy. + template + typename adt_attribute_proxy::type as_const(const adt_attribute_proxy& proxy) + { + return proxy.get(); + } + } +}} #endif diff --git a/include/boost/fusion/sequence/comparison/detail/equal_to.hpp b/include/boost/fusion/sequence/comparison/detail/equal_to.hpp index 3e15e63a..56cfe1b2 100644 --- a/include/boost/fusion/sequence/comparison/detail/equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/detail/equal_to.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,7 +33,7 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a == *b + return extension::as_const(*a) == extension::as_const(*b) && call(fusion::next(a), fusion::next(b)); } diff --git a/include/boost/fusion/sequence/comparison/detail/greater.hpp b/include/boost/fusion/sequence/comparison/detail/greater.hpp index b4c4b087..e6128776 100644 --- a/include/boost/fusion/sequence/comparison/detail/greater.hpp +++ b/include/boost/fusion/sequence/comparison/detail/greater.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a > *b || - (!(*b > *a) && call(fusion::next(a), fusion::next(b))); + return extension::as_const(*a) > extension::as_const(*b) || + (!(extension::as_const(*b) > extension::as_const(*a)) && + call(fusion::next(a), fusion::next(b))); } template diff --git a/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp index f3eccd5d..6d91e27b 100644 --- a/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp +++ b/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a >= *b - && (!(*b >= *a) || call(fusion::next(a), fusion::next(b))); + return extension::as_const(*a) >= extension::as_const(*b) + && (!(extension::as_const(*b) >= extension::as_const(*a)) || + call(fusion::next(a), fusion::next(b))); } template diff --git a/include/boost/fusion/sequence/comparison/detail/less.hpp b/include/boost/fusion/sequence/comparison/detail/less.hpp index 4957d7bf..1342bb14 100644 --- a/include/boost/fusion/sequence/comparison/detail/less.hpp +++ b/include/boost/fusion/sequence/comparison/detail/less.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a < *b || - (!(*b < *a) && call(fusion::next(a), fusion::next(b))); + return extension::as_const(*a) < extension::as_const(*b) || + (!(extension::as_const(*b) < extension::as_const(*a)) && + call(fusion::next(a), fusion::next(b))); } template diff --git a/include/boost/fusion/sequence/comparison/detail/less_equal.hpp b/include/boost/fusion/sequence/comparison/detail/less_equal.hpp index 08fe9ec3..5683849a 100644 --- a/include/boost/fusion/sequence/comparison/detail/less_equal.hpp +++ b/include/boost/fusion/sequence/comparison/detail/less_equal.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,8 +33,9 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a <= *b - && (!(*b <= *a) || call(fusion::next(a), fusion::next(b))); + return extension::as_const(*a) <= extension::as_const(*b) + && (!(extension::as_const(*b) <= extension::as_const(*a)) || + call(fusion::next(a), fusion::next(b))); } template diff --git a/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp index ac54dfb7..77c23508 100644 --- a/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp +++ b/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace fusion { namespace detail { @@ -32,7 +33,7 @@ namespace boost { namespace fusion { namespace detail static bool call(I1 const& a, I2 const& b, mpl::false_) { - return *a != *b + return extension::as_const(*a) != extension::as_const(*b) || call(fusion::next(a), fusion::next(b)); } diff --git a/include/boost/fusion/support.hpp b/include/boost/fusion/support.hpp index 765b777d..50bf924f 100644 --- a/include/boost/fusion/support.hpp +++ b/include/boost/fusion/support.hpp @@ -19,5 +19,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/support/as_const.hpp b/include/boost/fusion/support/as_const.hpp new file mode 100644 index 00000000..bb2a96a6 --- /dev/null +++ b/include/boost/fusion/support/as_const.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2012 Nathan Ridge + + 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) +==============================================================================*/ +#ifndef BOOST_FUSION_SUPPORT_AS_CONST_HPP +#define BOOST_FUSION_SUPPORT_AS_CONST_HPP + +namespace boost { namespace fusion { namespace extension +{ + // A customization point that allows certain wrappers around + // Fusion sequence elements (e.g. adt_attribute_proxy) to be + // unwrapped in contexts where the element only needs to be + // read. The library wraps accesses to Fusion elements in + // such contexts with calls to this function. Users can + // specialize this function for their own wrappers. + template + const T& as_const(const T& obj) + { + return obj; + } + +}}} + +#endif From a46bd7ab72e84e5a04720eee856d1827d3ce9f82 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 19 May 2012 01:18:43 +0000 Subject: [PATCH 41/99] patch for ticket #6910 by michel [SVN r78507] --- include/boost/fusion/functional/adapter/unfused.hpp | 12 ++++++++++++ .../fusion/functional/adapter/unfused_typed.hpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) mode change 100755 => 100644 include/boost/fusion/functional/adapter/unfused.hpp diff --git a/include/boost/fusion/functional/adapter/unfused.hpp b/include/boost/fusion/functional/adapter/unfused.hpp old mode 100755 new mode 100644 index b0d02bc4..facd5c54 --- a/include/boost/fusion/functional/adapter/unfused.hpp +++ b/include/boost/fusion/functional/adapter/unfused.hpp @@ -100,6 +100,7 @@ namespace boost { namespace fusion namespace boost { +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) template struct result_of< boost::fusion::unfused const () > { @@ -110,6 +111,17 @@ namespace boost { typedef typename boost::fusion::unfused::call_0_result type; }; +#endif + template + struct tr1_result_of< boost::fusion::unfused const () > + { + typedef typename boost::fusion::unfused::call_const_0_result type; + }; + template + struct tr1_result_of< boost::fusion::unfused() > + { + typedef typename boost::fusion::unfused::call_0_result type; + }; } #define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP_INCLUDED diff --git a/include/boost/fusion/functional/adapter/unfused_typed.hpp b/include/boost/fusion/functional/adapter/unfused_typed.hpp index 0f19f28f..923c6876 100644 --- a/include/boost/fusion/functional/adapter/unfused_typed.hpp +++ b/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -80,6 +80,7 @@ namespace boost { namespace fusion namespace boost { +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) template struct result_of< boost::fusion::unfused_typed const () > : boost::fusion::unfused_typed::template result< @@ -90,6 +91,17 @@ namespace boost : boost::fusion::unfused_typed::template result< boost::fusion::unfused_typed () > { }; +#endif + template + struct tr1_result_of< boost::fusion::unfused_typed const () > + : boost::fusion::unfused_typed::template result< + boost::fusion::unfused_typed const () > + { }; + template + struct tr1_result_of< boost::fusion::unfused_typed() > + : boost::fusion::unfused_typed::template result< + boost::fusion::unfused_typed () > + { }; } From ed3776ce8c476310b8d92d72ce8b1306a3fbe938 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 19 May 2012 01:24:16 +0000 Subject: [PATCH 42/99] BOOST_FUSION_DEFINE_STRUCT_INLINE patch by Nathan Ridge [SVN r78508] --- include/boost/fusion/adapted/struct.hpp | 1 + .../adapted/struct/define_struct_inline.hpp | 25 ++ .../struct/detail/define_struct_inline.hpp | 358 ++++++++++++++++++ .../fusion/include/define_struct_inline.hpp | 13 + 4 files changed, 397 insertions(+) create mode 100644 include/boost/fusion/adapted/struct/define_struct_inline.hpp create mode 100644 include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp create mode 100644 include/boost/fusion/include/define_struct_inline.hpp diff --git a/include/boost/fusion/adapted/struct.hpp b/include/boost/fusion/adapted/struct.hpp index acc12e69..e51b514b 100644 --- a/include/boost/fusion/adapted/struct.hpp +++ b/include/boost/fusion/adapted/struct.hpp @@ -16,5 +16,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/adapted/struct/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/define_struct_inline.hpp new file mode 100644 index 00000000..9dc5b44c --- /dev/null +++ b/include/boost/fusion/adapted/struct/define_struct_inline.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 2012 Nathan Ridge + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_INLINE_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_INLINE_HPP + +#include +#include + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL( \ + TEMPLATE_PARAMS_SEQ, \ + NAME, \ + ATTRIBUTES) + +#define BOOST_FUSION_DEFINE_STRUCT_INLINE(NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES) \ + +#endif diff --git a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp new file mode 100644 index 00000000..84eccca6 --- /dev/null +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -0,0 +1,358 @@ +/*============================================================================= + Copyright (c) 2012 Nathan Ridge + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \ + BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)() + +#define BOOST_FUSION_MAKE_CONST_REF_PARAM(R, DATA, N, ATTRIBUTE) \ + BOOST_PP_COMMA_IF(N) \ + BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) const& \ + BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE) + +#define BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(NAME) NAME(NAME) + +#define BOOST_FUSION_MAKE_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \ + BOOST_PP_COMMA_IF(N) \ + BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)) + +// Note: all template parameter names need to be uglified, otherwise they might +// shadow a template parameter of the struct when used with +// BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE + +#define BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS(Z, N, NAME) \ + template \ + struct value_of > \ + : boost::mpl::identity< \ + typename boost_fusion_uglified_Sq::t##N##_type \ + > \ + { \ + }; + +#define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \ + SPEC_TYPE, CALL_ARG_TYPE, TYPE_QUAL, ATTRIBUTE, N) \ + \ + template \ + struct deref > \ + { \ + typedef typename boost_fusion_uglified_Sq::t##N##_type TYPE_QUAL& type; \ + static type call(CALL_ARG_TYPE, N> const& iter) \ + { \ + return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ + } \ + }; + +#define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS(R, NAME, N, ATTRIBUTE) \ + BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \ + BOOST_PP_CAT(NAME, _iterator) \ + struct value_at > \ + { \ + typedef typename boost_fusion_uglified_Sq::t##N##_type type; \ + }; + +#define BOOST_FUSION_MAKE_AT_SPECS(R, DATA, N, ATTRIBUTE) \ + template \ + struct at > \ + { \ + typedef typename boost::mpl::if_< \ + boost::is_const, \ + typename boost_fusion_uglified_Sq::t##N##_type const&, \ + typename boost_fusion_uglified_Sq::t##N##_type& \ + >::type type; \ + \ + static type call(boost_fusion_uglified_Sq& sq) \ + { \ + return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ + } \ + }; + +#define BOOST_FUSION_MAKE_TYPEDEF(R, DATA, N, ATTRIBUTE) \ + typedef BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) t##N##_type; + +#define BOOST_FUSION_MAKE_DATA_MEMBER(R, DATA, N, ATTRIBUTE) \ + BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); + +#define BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES) \ + struct NAME : boost::fusion::sequence_facade< \ + NAME, \ + boost::fusion::random_access_traversal_tag \ + > \ + { \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \ + }; + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL( \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES) \ + \ + template < \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL( \ + (0)TEMPLATE_PARAMS_SEQ) \ + > \ + struct NAME : boost::fusion::sequence_facade< \ + NAME< \ + BOOST_PP_SEQ_ENUM(TEMPLATE_PARAMS_SEQ) \ + >, \ + boost::fusion::random_access_traversal_tag \ + > \ + { \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \ + }; + +#define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL( \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END)) + +#define BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL(NAME, ATTRIBUTES_SEQ) \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ + NAME, \ + ATTRIBUTES_SEQ, \ + BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)) + +#define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ + \ + NAME() \ + : BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY, \ + ~, \ + ATTRIBUTES_SEQ) \ + { \ + } \ + \ + NAME(BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_CONST_REF_PARAM, \ + ~, \ + ATTRIBUTES_SEQ)) \ + : BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_INIT_LIST_ENTRY, \ + ~, \ + ATTRIBUTES_SEQ) \ + { \ + } \ + \ + template \ + NAME(const boost_fusion_uglified_Seq& rhs) \ + { \ + boost::fusion::copy(rhs, *this); \ + } \ + \ + template \ + NAME& operator=(const boost_fusion_uglified_Seq& rhs) \ + { \ + boost::fusion::copy(rhs, *this); \ + return *this; \ + } \ + \ + template \ + struct NAME##_iterator \ + : boost::fusion::iterator_facade< \ + NAME##_iterator, \ + boost::fusion::random_access_traversal_tag \ + > \ + { \ + typedef boost::mpl::int_ index; \ + typedef boost_fusion_uglified_Seq sequence_type; \ + \ + NAME##_iterator(boost_fusion_uglified_Seq& seq) : seq_(seq) {} \ + \ + boost_fusion_uglified_Seq& seq_; \ + \ + template struct value_of; \ + BOOST_PP_REPEAT( \ + ATTRIBUTES_SEQ_SIZE, \ + BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \ + NAME) \ + \ + template struct deref; \ + BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \ + NAME, \ + ATTRIBUTES_SEQ) \ + \ + template \ + struct next \ + { \ + typedef NAME##_iterator< \ + typename boost_fusion_uglified_It::sequence_type, \ + boost_fusion_uglified_It::index::value + 1 \ + > type; \ + \ + static type call(boost_fusion_uglified_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + \ + template \ + struct prior \ + { \ + typedef NAME##_iterator< \ + typename boost_fusion_uglified_It::sequence_type, \ + boost_fusion_uglified_It::index::value - 1 \ + > type; \ + \ + static type call(boost_fusion_uglified_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + \ + template < \ + typename boost_fusion_uglified_It1, \ + typename boost_fusion_uglified_It2 \ + > \ + struct distance \ + { \ + typedef typename boost::mpl::minus< \ + typename boost_fusion_uglified_It2::index, \ + typename boost_fusion_uglified_It1::index \ + >::type type; \ + \ + static type call(boost_fusion_uglified_It1 const& it1, \ + boost_fusion_uglified_It2 const& it2) \ + { \ + return type(); \ + } \ + }; \ + \ + template < \ + typename boost_fusion_uglified_It, \ + typename boost_fusion_uglified_M \ + > \ + struct advance \ + { \ + typedef NAME##_iterator< \ + typename boost_fusion_uglified_It::sequence_type, \ + boost_fusion_uglified_It::index::value \ + + boost_fusion_uglified_M::value \ + > type; \ + \ + static type call(boost_fusion_uglified_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + }; \ + \ + template \ + struct begin \ + { \ + typedef NAME##_iterator type; \ + \ + static type call(boost_fusion_uglified_Sq& sq) \ + { \ + return type(sq); \ + } \ + }; \ + \ + template \ + struct end \ + { \ + typedef NAME##_iterator< \ + boost_fusion_uglified_Sq, \ + ATTRIBUTES_SEQ_SIZE \ + > type; \ + \ + static type call(boost_fusion_uglified_Sq& sq) \ + { \ + return type(sq); \ + } \ + }; \ + \ + template \ + struct size : boost::mpl::int_ \ + { \ + }; \ + \ + template \ + struct empty : boost::mpl::bool_ \ + { \ + }; \ + \ + template < \ + typename boost_fusion_uglified_Sq, \ + typename boost_fusion_uglified_N \ + > \ + struct value_at : value_at< \ + boost_fusion_uglified_Sq, \ + boost::mpl::int_ \ + > \ + { \ + }; \ + \ + BOOST_PP_REPEAT( \ + ATTRIBUTES_SEQ_SIZE, \ + BOOST_FUSION_MAKE_VALUE_AT_SPECS, \ + ~) \ + \ + template < \ + typename boost_fusion_uglified_Sq, \ + typename boost_fusion_uglified_N \ + > \ + struct at : at< \ + boost_fusion_uglified_Sq, \ + boost::mpl::int_ \ + > \ + { \ + }; \ + \ + BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_AT_SPECS, ~, ATTRIBUTES_SEQ) \ + \ + BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_TYPEDEF, ~, ATTRIBUTES_SEQ) \ + \ + BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_DATA_MEMBER, \ + ~, \ + ATTRIBUTES_SEQ) + +#endif diff --git a/include/boost/fusion/include/define_struct_inline.hpp b/include/boost/fusion/include/define_struct_inline.hpp new file mode 100644 index 00000000..141ad4e2 --- /dev/null +++ b/include/boost/fusion/include/define_struct_inline.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2012 Nathan Ridge + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_DEFINE_STRUCT_INLINE_HPP +#define BOOST_FUSION_INCLUDE_DEFINE_STRUCT_INLINE_HPP + +#include + +#endif From 70589c53c66ccfc2052bf4b2f58eb8120752e783 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 19 May 2012 01:24:55 +0000 Subject: [PATCH 43/99] BOOST_FUSION_DEFINE_STRUCT_INLINE patch by Nathan Ridge [SVN r78509] --- doc/adapted.qbk | 94 +++++++++++++++++ test/Jamfile | 4 +- test/sequence/define_struct_inline.cpp | 110 ++++++++++++++++++++ test/sequence/define_tpl_struct_inline.cpp | 114 +++++++++++++++++++++ 4 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 test/sequence/define_struct_inline.cpp create mode 100644 test/sequence/define_tpl_struct_inline.cpp diff --git a/doc/adapted.qbk b/doc/adapted.qbk index 7d07a6d8..f762a049 100644 --- a/doc/adapted.qbk +++ b/doc/adapted.qbk @@ -1115,6 +1115,100 @@ defined in __random_access_sequence__. [endsect] +[section:define_struct_inline BOOST_FUSION_DEFINE_STRUCT_INLINE] + +[heading Description] + +BOOST_FUSION_DEFINE_STRUCT_INLINE is a macro that can be used to generate all +the necessary boilerplate to define and adapt an arbitrary struct as a model of +__random_access_sequence__. Unlike BOOST_FUSION_DEFINE_STRUCT, it can be used +at class or namespace scope. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_STRUCT_INLINE( + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Expression Semantics] + +The semantics of BOOST_FUSION_DEFINE_STRUCT_INLINE are identical to those of +BOOST_FUSION_DEFINE_STRUCT, with two differences: + +# BOOST_FUSION_DEFINE_STRUCT_INLINE can be used at class or namespace scope, and + thus does not take a namespace list parameter. +# The structure generated by BOOST_FUSION_DEFINE_STRUCT_INLINE has a base class, + and is thus not POD in C++03. + +[heading Header] + + #include + #include + +[heading Example] + + // enclosing::employee is a Fusion sequence + class enclosing + { + BOOST_FUSION_DEFINE_STRUCT_INLINE( + employee, + (std::string, name) + (int, age)) + }; + + +[endsect] + +[section:define_tpl_struct_inline BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE] + +[heading Description] + +BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE is a macro that can be used to generate +all the necessary boilerplate to define and adapt an arbitrary template struct +as a model of __random_access_sequence__. Unlike BOOST_FUSION_DEFINE_TPL_STRUCT, +it can be used at class or namespace scope. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( + (template_param0)(template_param1)..., + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Expression Semantics] + +The semantics of BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE are identical to those of +BOOST_FUSION_DEFINE_TPL_STRUCT, with two differences: + +# BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE can be used at class or namespace scope, + and thus does not take a namespace list parameter. +# The structure generated by BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE has a base + class, and is thus not POD in C++03. + +[heading Header] + + #include + #include + +[heading Example] + + // Any instantiated enclosing::employee is a Fusion sequence + class enclosing + { + BOOST_FUSION_DEFINE_TPL_STRUCT( + (Name)(Age), employee, + (Name, name) + (Age, age)) + }; + +[endsect] + [section:define_assoc_struct BOOST_FUSION_DEFINE_ASSOC_STRUCT] [heading Description] diff --git a/test/Jamfile b/test/Jamfile index 3cea5ecf..59ec32b2 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -132,8 +132,10 @@ import testing ; [ run sequence/adapt_tpl_struct.cpp : : : : ] [ run sequence/adt_attribute_proxy.cpp : : : : ] [ run sequence/define_struct.cpp : : : : ] + [ run sequence/define_struct_inline.cpp : : : : ] [ run sequence/define_assoc_struct.cpp : : : : ] - [ run sequence/define_tpl_struct.cpp : : : : ] + [ run sequence/define_tpl_struct.cpp : : : : ] + [ run sequence/define_tpl_struct_inline.cpp : : : : ] [ run sequence/define_assoc_tpl_struct.cpp : : : : ] [ run sequence/std_tuple_iterator.cpp : : : : ] diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp new file mode 100644 index 00000000..8885275d --- /dev/null +++ b/test/sequence/define_struct_inline.cpp @@ -0,0 +1,110 @@ +/*============================================================================= + 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) +==============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct cls +{ + BOOST_FUSION_DEFINE_STRUCT_INLINE( + point, + (int, x) + (int, y) + ) +}; + +namespace ns +{ + BOOST_FUSION_DEFINE_STRUCT_INLINE(s, (int, m)) +} + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view)); + cls::point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector v1(4, 2); + cls::point v2(5, 3); + vector v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from cls::point to vector + cls::point p(5, 3); + vector v(p); + v = p; + } + + { + // conversion from cls::point to list + cls::point p(5, 3); + list l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + + typedef boost::fusion::result_of::begin::type b; + typedef boost::fusion::result_of::end::type e; + // this fails + BOOST_MPL_ASSERT((boost::is_same::type, e>)); + } + + { + cls::point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + diff --git a/test/sequence/define_tpl_struct_inline.cpp b/test/sequence/define_tpl_struct_inline.cpp new file mode 100644 index 00000000..9aa574a0 --- /dev/null +++ b/test/sequence/define_tpl_struct_inline.cpp @@ -0,0 +1,114 @@ +/*============================================================================= + Copyright (c) 2010, 2012 Christopher Schmidt, nathan Ridge + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct cls +{ + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( + (X)(Y), + point, + (X, x) + (Y, y) + ) +}; + +namespace ns +{ + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE((M), s, (M, m)) +} + +int +main() +{ + using namespace boost::fusion; + + typedef cls::point point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view)); + point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector v1(4, 2); + point v2(5, 3); + vector v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p(5, 3); + vector v(p); + v = p; + } + + { + // conversion from point to list + point p(5, 3); + list l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + + typedef boost::fusion::result_of::begin >::type b; + typedef boost::fusion::result_of::end >::type e; + // this fails + BOOST_MPL_ASSERT((boost::is_same::type, e>)); + } + + + { + point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + From 136331963a5588a3e77d44ffd8991f434bc30531 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 26 Jun 2012 10:14:49 +0000 Subject: [PATCH 44/99] Added test for Ticket #6965 [SVN r79098] --- test/Jamfile | 3 +- test/sequence/ref_vector.cpp | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 test/sequence/ref_vector.cpp diff --git a/test/Jamfile b/test/Jamfile index 59ec32b2..21fd42dd 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -134,10 +134,11 @@ import testing ; [ run sequence/define_struct.cpp : : : : ] [ run sequence/define_struct_inline.cpp : : : : ] [ run sequence/define_assoc_struct.cpp : : : : ] - [ run sequence/define_tpl_struct.cpp : : : : ] + [ run sequence/define_tpl_struct.cpp : : : : ] [ run sequence/define_tpl_struct_inline.cpp : : : : ] [ run sequence/define_assoc_tpl_struct.cpp : : : : ] [ run sequence/std_tuple_iterator.cpp : : : : ] + [ run sequence/ref_vector.cpp : : : : ] [ run functional/fused.cpp : : : : ] [ run functional/fused_function_object.cpp : : : : ] diff --git a/test/sequence/ref_vector.cpp b/test/sequence/ref_vector.cpp new file mode 100644 index 00000000..8bd0929b --- /dev/null +++ b/test/sequence/ref_vector.cpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2012 Joel falcou + + 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 +#include +#include +#include +#include +#include +#include + +struct foo +{ + double d; float f; short c; +}; + +BOOST_FUSION_ADAPT_STRUCT(foo,(double,d)(float,f)(short,c)) + +template +class composite_reference + : public boost::mpl:: + transform < typename boost::fusion::result_of:: + as_vector::type + , boost::add_reference + >::type +{ + public: + typedef typename boost::mpl:: + transform < typename boost::fusion::result_of:: + as_vector::type + , boost::add_reference + >::type parent; + + composite_reference(T& src) : parent( src ) {} + composite_reference(parent& src) : parent(src) {} + + composite_reference& operator=(T& src) + { + static_cast(*this) = static_cast(src); + return *this; + } + + composite_reference& operator=(parent const& src) + { + static_cast(*this) = src; + return *this; + } +}; + +int main(int,char**) +{ + foo f; + composite_reference ref_f(f); + + boost::fusion::at_c<0>(ref_f) = 1.2; + boost::fusion::at_c<1>(ref_f) = 1.2f; + boost::fusion::at_c<2>(ref_f) = 12; + + std::cout << f.d << " " << f.f << " " << f.c << "\n"; +} From 191a3d75ede7d19a53676a3f7b45f901d13ec85f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 26 Jun 2012 10:16:35 +0000 Subject: [PATCH 45/99] Fix for Ticket #6965 from Joel Falcou [SVN r79099] --- .../vector/detail/preprocessed/vector10.hpp | 141 ++++++++++++++++++ .../vector/detail/preprocessed/vector20.hpp | 140 +++++++++++++++++ .../vector/detail/preprocessed/vector30.hpp | 140 +++++++++++++++++ .../vector/detail/preprocessed/vector40.hpp | 140 +++++++++++++++++ .../vector/detail/preprocessed/vector50.hpp | 140 +++++++++++++++++ .../container/vector/detail/vector_n.hpp | 19 +++ 6 files changed, 720 insertions(+) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp index d6258f60..8ef9947d 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp @@ -34,6 +34,15 @@ namespace boost { namespace fusion return vector_data1(*i0); } + template + static vector_data1 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + + return vector_data1(*i0); + } T0 m0; }; template @@ -64,6 +73,12 @@ namespace boost { namespace fusion , typename boost::disable_if >::type* = 0 ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector1( + Sequence& seq + , typename boost::disable_if >::type* = 0 + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector1& operator=(vector1 const& vec) @@ -121,6 +136,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); return vector_data2(*i0 , *i1); } + template + static vector_data2 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); + return vector_data2(*i0 , *i1); + } T0 m0; T1 m1; }; template @@ -149,6 +173,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector2( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector2& operator=(vector2 const& vec) @@ -206,6 +235,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); return vector_data3(*i0 , *i1 , *i2); } + template + static vector_data3 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); + return vector_data3(*i0 , *i1 , *i2); + } T0 m0; T1 m1; T2 m2; }; template @@ -234,6 +272,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector3( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector3& operator=(vector3 const& vec) @@ -291,6 +334,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); return vector_data4(*i0 , *i1 , *i2 , *i3); } + template + static vector_data4 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); + return vector_data4(*i0 , *i1 , *i2 , *i3); + } T0 m0; T1 m1; T2 m2; T3 m3; }; template @@ -319,6 +371,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector4( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector4& operator=(vector4 const& vec) @@ -376,6 +433,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); return vector_data5(*i0 , *i1 , *i2 , *i3 , *i4); } + template + static vector_data5 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); + return vector_data5(*i0 , *i1 , *i2 , *i3 , *i4); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; }; template @@ -404,6 +470,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector5( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector5& operator=(vector5 const& vec) @@ -461,6 +532,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); return vector_data6(*i0 , *i1 , *i2 , *i3 , *i4 , *i5); } + template + static vector_data6 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); + return vector_data6(*i0 , *i1 , *i2 , *i3 , *i4 , *i5); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; }; template @@ -489,6 +569,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector6( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector6& operator=(vector6 const& vec) @@ -546,6 +631,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); return vector_data7(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6); } + template + static vector_data7 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); + return vector_data7(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; }; template @@ -574,6 +668,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector7( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector7& operator=(vector7 const& vec) @@ -631,6 +730,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); return vector_data8(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7); } + template + static vector_data8 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); + return vector_data8(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; }; template @@ -659,6 +767,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector8( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector8& operator=(vector8 const& vec) @@ -716,6 +829,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); return vector_data9(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8); } + template + static vector_data9 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); + return vector_data9(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; }; template @@ -744,6 +866,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector9( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector9& operator=(vector9 const& vec) @@ -801,6 +928,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); return vector_data10(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9); } + template + static vector_data10 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); + return vector_data10(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; }; template @@ -829,6 +965,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector10( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector10& operator=(vector10 const& vec) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp index a409b2e7..151acbbd 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp @@ -37,6 +37,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); return vector_data11(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10); } + template + static vector_data11 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); + return vector_data11(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; }; template @@ -65,6 +74,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector11( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector11& operator=(vector11 const& vec) @@ -122,6 +136,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); return vector_data12(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11); } + template + static vector_data12 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); + return vector_data12(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; }; template @@ -150,6 +173,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector12( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector12& operator=(vector12 const& vec) @@ -207,6 +235,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); return vector_data13(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12); } + template + static vector_data13 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); + return vector_data13(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; }; template @@ -235,6 +272,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector13( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector13& operator=(vector13 const& vec) @@ -292,6 +334,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); return vector_data14(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13); } + template + static vector_data14 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); + return vector_data14(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; }; template @@ -320,6 +371,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector14( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector14& operator=(vector14 const& vec) @@ -377,6 +433,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); return vector_data15(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14); } + template + static vector_data15 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); + return vector_data15(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; }; template @@ -405,6 +470,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector15( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector15& operator=(vector15 const& vec) @@ -462,6 +532,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); return vector_data16(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15); } + template + static vector_data16 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); + return vector_data16(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; }; template @@ -490,6 +569,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector16( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector16& operator=(vector16 const& vec) @@ -547,6 +631,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); return vector_data17(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16); } + template + static vector_data17 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); + return vector_data17(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; }; template @@ -575,6 +668,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector17( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector17& operator=(vector17 const& vec) @@ -632,6 +730,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); return vector_data18(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17); } + template + static vector_data18 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); + return vector_data18(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; }; template @@ -660,6 +767,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector18( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector18& operator=(vector18 const& vec) @@ -717,6 +829,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); return vector_data19(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18); } + template + static vector_data19 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); + return vector_data19(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; }; template @@ -745,6 +866,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector19( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector19& operator=(vector19 const& vec) @@ -802,6 +928,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); return vector_data20(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19); } + template + static vector_data20 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); + return vector_data20(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; }; template @@ -830,6 +965,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector20( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector20& operator=(vector20 const& vec) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp index 032ff9d2..3810091b 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp @@ -37,6 +37,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); return vector_data21(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20); } + template + static vector_data21 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); + return vector_data21(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; }; template @@ -65,6 +74,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector21( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector21& operator=(vector21 const& vec) @@ -122,6 +136,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); return vector_data22(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21); } + template + static vector_data22 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); + return vector_data22(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; }; template @@ -150,6 +173,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector22( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector22& operator=(vector22 const& vec) @@ -207,6 +235,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); return vector_data23(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22); } + template + static vector_data23 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); + return vector_data23(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; }; template @@ -235,6 +272,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector23( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector23& operator=(vector23 const& vec) @@ -292,6 +334,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); return vector_data24(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23); } + template + static vector_data24 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); + return vector_data24(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9 , *i10 , *i11 , *i12 , *i13 , *i14 , *i15 , *i16 , *i17 , *i18 , *i19 , *i20 , *i21 , *i22 , *i23); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; }; template @@ -320,6 +371,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector24( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector24& operator=(vector24 const& vec) @@ -377,6 +433,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); return vector_data25(*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); } + template + static vector_data25 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); + return vector_data25(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; }; template @@ -405,6 +470,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector25( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector25& operator=(vector25 const& vec) @@ -462,6 +532,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); return vector_data26(*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); } + template + static vector_data26 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); + return vector_data26(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; }; template @@ -490,6 +569,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector26( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector26& operator=(vector26 const& vec) @@ -547,6 +631,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); return vector_data27(*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); } + template + static vector_data27 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); + return vector_data27(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; }; template @@ -575,6 +668,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector27( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector27& operator=(vector27 const& vec) @@ -632,6 +730,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); return vector_data28(*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); } + template + static vector_data28 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); + return vector_data28(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; }; template @@ -660,6 +767,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector28( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector28& operator=(vector28 const& vec) @@ -717,6 +829,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); return vector_data29(*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); } + template + static vector_data29 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); + return vector_data29(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; }; template @@ -745,6 +866,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector29( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector29& operator=(vector29 const& vec) @@ -802,6 +928,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); return vector_data30(*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); } + template + static vector_data30 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); + return vector_data30(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; }; template @@ -830,6 +965,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector30( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector30& operator=(vector30 const& vec) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp index 1b5fa58d..07fac8dc 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp @@ -37,6 +37,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); return vector_data31(*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); } + template + static vector_data31 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); + return vector_data31(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; }; template @@ -65,6 +74,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector31( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector31& operator=(vector31 const& vec) @@ -122,6 +136,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); return vector_data32(*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); } + template + static vector_data32 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); + return vector_data32(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; }; template @@ -150,6 +173,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector32( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector32& operator=(vector32 const& vec) @@ -207,6 +235,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); return vector_data33(*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); } + template + static vector_data33 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); + return vector_data33(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; }; template @@ -235,6 +272,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector33( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector33& operator=(vector33 const& vec) @@ -292,6 +334,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); return vector_data34(*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); } + template + static vector_data34 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); + return vector_data34(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; }; template @@ -320,6 +371,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector34( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector34& operator=(vector34 const& vec) @@ -377,6 +433,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); return vector_data35(*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); } + template + static vector_data35 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); + return vector_data35(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; }; template @@ -405,6 +470,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector35( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector35& operator=(vector35 const& vec) @@ -462,6 +532,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); return vector_data36(*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); } + template + static vector_data36 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); + return vector_data36(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; }; template @@ -490,6 +569,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector36( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector36& operator=(vector36 const& vec) @@ -547,6 +631,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); return vector_data37(*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); } + template + static vector_data37 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); + return vector_data37(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; }; template @@ -575,6 +668,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector37( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector37& operator=(vector37 const& vec) @@ -632,6 +730,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); return vector_data38(*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); } + template + static vector_data38 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); + return vector_data38(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; }; template @@ -660,6 +767,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector38( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector38& operator=(vector38 const& vec) @@ -717,6 +829,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); return vector_data39(*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); } + template + static vector_data39 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); + return vector_data39(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; }; template @@ -745,6 +866,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector39( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector39& operator=(vector39 const& vec) @@ -802,6 +928,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); return vector_data40(*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); } + template + static vector_data40 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); + return vector_data40(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; }; template @@ -830,6 +965,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector40( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector40& operator=(vector40 const& vec) diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp b/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp index ba6c1771..7ef9402e 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp +++ b/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp @@ -37,6 +37,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); return vector_data41(*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); } + template + static vector_data41 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); + return vector_data41(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; }; template @@ -65,6 +74,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector41( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector41& operator=(vector41 const& vec) @@ -122,6 +136,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); return vector_data42(*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); } + template + static vector_data42 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); + return vector_data42(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; }; template @@ -150,6 +173,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector42( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector42& operator=(vector42 const& vec) @@ -207,6 +235,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); return vector_data43(*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); } + template + static vector_data43 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); + return vector_data43(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; }; template @@ -235,6 +272,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector43( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector43& operator=(vector43 const& vec) @@ -292,6 +334,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); return vector_data44(*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); } + template + static vector_data44 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); + return vector_data44(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; }; template @@ -320,6 +371,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector44( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector44& operator=(vector44 const& vec) @@ -377,6 +433,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); return vector_data45(*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); } + template + static vector_data45 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); + return vector_data45(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; }; template @@ -405,6 +470,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector45( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector45& operator=(vector45 const& vec) @@ -462,6 +532,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); return vector_data46(*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); } + template + static vector_data46 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); + return vector_data46(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; T45 m45; }; template @@ -490,6 +569,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector46( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector46& operator=(vector46 const& vec) @@ -547,6 +631,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); return vector_data47(*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); } + template + static vector_data47 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); + return vector_data47(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; T45 m45; T46 m46; }; template @@ -575,6 +668,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector47( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector47& operator=(vector47 const& vec) @@ -632,6 +730,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); return vector_data48(*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); } + template + static vector_data48 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); + return vector_data48(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; T45 m45; T46 m46; T47 m47; }; template @@ -660,6 +767,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector48( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector48& operator=(vector48 const& vec) @@ -717,6 +829,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); typedef typename result_of::next< I47>::type I48; I48 i48 = fusion::next(i47); return vector_data49(*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); } + template + static vector_data49 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); typedef typename result_of::next< I47>::type I48; I48 i48 = fusion::next(i47); + return vector_data49(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; T45 m45; T46 m46; T47 m47; T48 m48; }; template @@ -745,6 +866,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector49( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector49& operator=(vector49 const& vec) @@ -802,6 +928,15 @@ namespace boost { namespace fusion typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); typedef typename result_of::next< I47>::type I48; I48 i48 = fusion::next(i47); typedef typename result_of::next< I48>::type I49; I49 i49 = fusion::next(i48); return vector_data50(*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); } + template + static vector_data50 + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8); typedef typename result_of::next< I9>::type I10; I10 i10 = fusion::next(i9); typedef typename result_of::next< I10>::type I11; I11 i11 = fusion::next(i10); typedef typename result_of::next< I11>::type I12; I12 i12 = fusion::next(i11); typedef typename result_of::next< I12>::type I13; I13 i13 = fusion::next(i12); typedef typename result_of::next< I13>::type I14; I14 i14 = fusion::next(i13); typedef typename result_of::next< I14>::type I15; I15 i15 = fusion::next(i14); typedef typename result_of::next< I15>::type I16; I16 i16 = fusion::next(i15); typedef typename result_of::next< I16>::type I17; I17 i17 = fusion::next(i16); typedef typename result_of::next< I17>::type I18; I18 i18 = fusion::next(i17); typedef typename result_of::next< I18>::type I19; I19 i19 = fusion::next(i18); typedef typename result_of::next< I19>::type I20; I20 i20 = fusion::next(i19); typedef typename result_of::next< I20>::type I21; I21 i21 = fusion::next(i20); typedef typename result_of::next< I21>::type I22; I22 i22 = fusion::next(i21); typedef typename result_of::next< I22>::type I23; I23 i23 = fusion::next(i22); typedef typename result_of::next< I23>::type I24; I24 i24 = fusion::next(i23); typedef typename result_of::next< I24>::type I25; I25 i25 = fusion::next(i24); typedef typename result_of::next< I25>::type I26; I26 i26 = fusion::next(i25); typedef typename result_of::next< I26>::type I27; I27 i27 = fusion::next(i26); typedef typename result_of::next< I27>::type I28; I28 i28 = fusion::next(i27); typedef typename result_of::next< I28>::type I29; I29 i29 = fusion::next(i28); typedef typename result_of::next< I29>::type I30; I30 i30 = fusion::next(i29); typedef typename result_of::next< I30>::type I31; I31 i31 = fusion::next(i30); typedef typename result_of::next< I31>::type I32; I32 i32 = fusion::next(i31); typedef typename result_of::next< I32>::type I33; I33 i33 = fusion::next(i32); typedef typename result_of::next< I33>::type I34; I34 i34 = fusion::next(i33); typedef typename result_of::next< I34>::type I35; I35 i35 = fusion::next(i34); typedef typename result_of::next< I35>::type I36; I36 i36 = fusion::next(i35); typedef typename result_of::next< I36>::type I37; I37 i37 = fusion::next(i36); typedef typename result_of::next< I37>::type I38; I38 i38 = fusion::next(i37); typedef typename result_of::next< I38>::type I39; I39 i39 = fusion::next(i38); typedef typename result_of::next< I39>::type I40; I40 i40 = fusion::next(i39); typedef typename result_of::next< I40>::type I41; I41 i41 = fusion::next(i40); typedef typename result_of::next< I41>::type I42; I42 i42 = fusion::next(i41); typedef typename result_of::next< I42>::type I43; I43 i43 = fusion::next(i42); typedef typename result_of::next< I43>::type I44; I44 i44 = fusion::next(i43); typedef typename result_of::next< I44>::type I45; I45 i45 = fusion::next(i44); typedef typename result_of::next< I45>::type I46; I46 i46 = fusion::next(i45); typedef typename result_of::next< I46>::type I47; I47 i47 = fusion::next(i46); typedef typename result_of::next< I47>::type I48; I48 i48 = fusion::next(i47); typedef typename result_of::next< I48>::type I49; I49 i49 = fusion::next(i48); + return vector_data50(*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); + } T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9; T10 m10; T11 m11; T12 m12; T13 m13; T14 m14; T15 m15; T16 m16; T17 m17; T18 m18; T19 m19; T20 m20; T21 m21; T22 m22; T23 m23; T24 m24; T25 m25; T26 m26; T27 m27; T28 m28; T29 m29; T30 m30; T31 m31; T32 m32; T33 m33; T34 m34; T35 m35; T36 m36; T37 m37; T38 m38; T39 m39; T40 m40; T41 m41; T42 m42; T43 m43; T44 m44; T45 m45; T46 m46; T47 m47; T48 m48; T49 m49; }; template @@ -830,6 +965,11 @@ namespace boost { namespace fusion Sequence const& seq ) : base_type(base_type::init_from_sequence(seq)) {} + template + vector50( + Sequence& seq + ) + : base_type(base_type::init_from_sequence(seq)) {} template vector50& operator=(vector50 const& vec) diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 431774b3..4e249c7f 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -68,6 +68,16 @@ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } + template + static BOOST_PP_CAT(vector_data, N) + init_from_sequence(Sequence& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) + return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); + } + BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _) }; @@ -109,6 +119,15 @@ ) : base_type(base_type::init_from_sequence(seq)) {} + template + BOOST_PP_CAT(vector, N)( + Sequence& seq +#if (N == 1) + , typename boost::disable_if >::type* /*dummy*/ = 0 +#endif + ) + : base_type(base_type::init_from_sequence(seq)) {} + template BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N) const& vec) From 85583b5ea9f6076131234f87a9ab5b1b40fa21ad Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 27 Jun 2012 04:27:50 +0000 Subject: [PATCH 46/99] allow boolean traits implementations to use std::true_type and std::false_type [SVN r79131] --- include/boost/fusion/support/is_segmented.hpp | 7 +++++-- include/boost/fusion/support/is_sequence.hpp | 8 +++++--- include/boost/fusion/support/is_view.hpp | 7 +++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/boost/fusion/support/is_segmented.hpp b/include/boost/fusion/support/is_segmented.hpp index ba571dc5..6e62eac4 100644 --- a/include/boost/fusion/support/is_segmented.hpp +++ b/include/boost/fusion/support/is_segmented.hpp @@ -7,6 +7,7 @@ #if !defined(FUSION_IS_SEGMENTED_03202006_0015) #define FUSION_IS_SEGMENTED_03202006_0015 +#include #include namespace boost { namespace fusion @@ -41,8 +42,10 @@ namespace boost { namespace fusion { template struct is_segmented - : extension::is_segmented_impl::type>:: - template apply + : mpl::bool_< + (bool)extension::is_segmented_impl::type>:: + template apply::type::value + > { }; } diff --git a/include/boost/fusion/support/is_sequence.hpp b/include/boost/fusion/support/is_sequence.hpp index 2f0ee433..d33af6ab 100644 --- a/include/boost/fusion/support/is_sequence.hpp +++ b/include/boost/fusion/support/is_sequence.hpp @@ -59,9 +59,11 @@ namespace boost { namespace fusion { template struct is_sequence - : extension::is_sequence_impl< - typename fusion::detail::tag_of::type - >::template apply + : mpl::bool_< + (bool)extension::is_sequence_impl< + typename fusion::detail::tag_of::type + >::template apply::type::value + > {}; template diff --git a/include/boost/fusion/support/is_view.hpp b/include/boost/fusion/support/is_view.hpp index dbcc93a9..4ec9e065 100644 --- a/include/boost/fusion/support/is_view.hpp +++ b/include/boost/fusion/support/is_view.hpp @@ -7,6 +7,7 @@ #if !defined(FUSION_IS_VIEW_03202006_0015) #define FUSION_IS_VIEW_03202006_0015 +#include #include #include @@ -54,8 +55,10 @@ namespace boost { namespace fusion { template struct is_view : - extension::is_view_impl::type>:: - template apply::type + mpl::bool_< + (bool)extension::is_view_impl::type>:: + template apply::type::value + > {}; } }} From a3b0cad1e7ff4a1163b35c13a771094a02c20f0b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 5 Jul 2012 23:39:50 +0000 Subject: [PATCH 47/99] latest oatch from Nathan Ridge [SVN r79305] --- test/sequence/adapt_adt.cpp | 38 ++++++++++++++++++++++ test/sequence/adapt_tpl_adt.cpp | 15 +++++++++ test/sequence/define_struct_inline.cpp | 7 ++++ test/sequence/define_tpl_struct_inline.cpp | 7 ++++ 4 files changed, 67 insertions(+) diff --git a/test/sequence/adapt_adt.cpp b/test/sequence/adapt_adt.cpp index 73868367..d4f4a8c2 100644 --- a/test/sequence/adapt_adt.cpp +++ b/test/sequence/adapt_adt.cpp @@ -71,6 +71,24 @@ namespace ns int y; }; #endif + + // A sequence that has data members defined in an unrelated namespace + // (std, in this case). This allows testing ADL issues. + class name + { + public: + name() {} + name(const std::string& last, const std::string& first) + : last(last), first(first) {} + + const std::string& get_last() const { return last; } + const std::string& get_first() const { return first; } + void set_last(const std::string& last_) { last = last_; } + void set_first(const std::string& first_) { first = first_; } + private: + std::string last; + std::string first; + }; } BOOST_FUSION_ADAPT_ADT( @@ -87,6 +105,12 @@ BOOST_FUSION_ADAPT_ADT( ) #endif +BOOST_FUSION_ADAPT_ADT( + ns::name, + (const std::string&, const std::string&, obj.get_last(), obj.set_last(val)) + (const std::string&, const std::string&, obj.get_first(), obj.set_first(val)) +) + int main() { @@ -130,6 +154,20 @@ main() BOOST_TEST(v3 > v2); BOOST_TEST(v3 >= v2); } + + { + fusion::vector v1("Lincoln", "Abraham"); + ns::name v2("Roosevelt", "Franklin"); + ns::name v3("Roosevelt", "Theodore"); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } { // conversion from ns::point to vector diff --git a/test/sequence/adapt_tpl_adt.cpp b/test/sequence/adapt_tpl_adt.cpp index 2f0d4c6b..aeb0f721 100644 --- a/test/sequence/adapt_tpl_adt.cpp +++ b/test/sequence/adapt_tpl_adt.cpp @@ -67,6 +67,7 @@ main() using namespace boost::fusion; typedef ns::point point; + typedef ns::point name; std::cout << tuple_open('['); std::cout << tuple_close(']'); @@ -106,6 +107,20 @@ main() BOOST_TEST(v3 >= v2); } + { + boost::fusion::vector v1("Lincoln", "Abraham"); + name v2("Roosevelt", "Franklin"); + name v3("Roosevelt", "Theodore"); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + { // conversion from point to vector point p(5, 3); diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp index 8885275d..9e3f6277 100644 --- a/test/sequence/define_struct_inline.cpp +++ b/test/sequence/define_struct_inline.cpp @@ -29,6 +29,8 @@ struct cls namespace ns { BOOST_FUSION_DEFINE_STRUCT_INLINE(s, (int, m)) + + BOOST_FUSION_DEFINE_STRUCT_INLINE(empty_struct, ) } int @@ -40,6 +42,11 @@ main() std::cout << tuple_close(']'); std::cout << tuple_delimiter(", "); + { + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 0); + BOOST_STATIC_ASSERT(boost::fusion::result_of::empty::value); + } + { BOOST_MPL_ASSERT_NOT((traits::is_view)); cls::point p(123, 456); diff --git a/test/sequence/define_tpl_struct_inline.cpp b/test/sequence/define_tpl_struct_inline.cpp index 9aa574a0..1052f5db 100644 --- a/test/sequence/define_tpl_struct_inline.cpp +++ b/test/sequence/define_tpl_struct_inline.cpp @@ -30,6 +30,8 @@ struct cls namespace ns { BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE((M), s, (M, m)) + + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE((M), empty_struct, ) } int @@ -43,6 +45,11 @@ main() std::cout << tuple_close(']'); std::cout << tuple_delimiter(", "); + { + BOOST_STATIC_ASSERT(boost::fusion::result_of::size >::value == 0); + BOOST_STATIC_ASSERT(boost::fusion::result_of::empty >::value); + } + { BOOST_MPL_ASSERT_NOT((traits::is_view)); point p(123, 456); From eaf9e79e85154a2a75c20fd681fca564e0c57b6a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 5 Jul 2012 23:40:17 +0000 Subject: [PATCH 48/99] latest patch from Nathan Ridge [SVN r79306] --- .../struct/detail/define_struct_inline.hpp | 45 +++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) 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 84eccca6..a7961ec3 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -29,6 +29,27 @@ #define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \ BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)() +#define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST(ATTRIBUTES_SEQ) \ + : BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY, \ + ~, \ + ATTRIBUTES_SEQ) \ + +#define BOOST_FUSION_IGNORE_1(ARG1) +#define BOOST_FUSION_IGNORE_2(ARG1, ARG2) + +#define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \ + NAME(BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_CONST_REF_PARAM, \ + ~, \ + ATTRIBUTES_SEQ)) \ + : BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_INIT_LIST_ENTRY, \ + ~, \ + ATTRIBUTES_SEQ) \ + { \ + } \ + #define BOOST_FUSION_MAKE_CONST_REF_PARAM(R, DATA, N, ATTRIBUTE) \ BOOST_PP_COMMA_IF(N) \ BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) const& \ @@ -162,23 +183,19 @@ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ \ NAME() \ - : BOOST_PP_SEQ_FOR_EACH_I( \ - BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY, \ - ~, \ - ATTRIBUTES_SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ + BOOST_FUSION_MAKE_DEFAULT_INIT_LIST, \ + BOOST_FUSION_IGNORE_1) \ + (ATTRIBUTES_SEQ) \ { \ } \ \ - NAME(BOOST_PP_SEQ_FOR_EACH_I( \ - BOOST_FUSION_MAKE_CONST_REF_PARAM, \ - ~, \ - ATTRIBUTES_SEQ)) \ - : BOOST_PP_SEQ_FOR_EACH_I( \ - BOOST_FUSION_MAKE_INIT_LIST_ENTRY, \ - ~, \ - ATTRIBUTES_SEQ) \ - { \ - } \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ + BOOST_FUSION_MAKE_COPY_CONSTRUCTOR, \ + BOOST_FUSION_IGNORE_2) \ + (NAME, ATTRIBUTES_SEQ) \ \ template \ NAME(const boost_fusion_uglified_Seq& rhs) \ From 4ccb4328f659c058e5909f368ca91b2376e808df Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sat, 28 Jul 2012 20:44:56 +0000 Subject: [PATCH 49/99] Fusion: fixing bogus preprocessor directive (missing newline at end of file) [SVN r79788] --- include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp | 2 +- include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp | 2 +- include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp b/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp index 53306dab..6abb0336 100644 --- a/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp +++ b/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp b/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp index ec01d4b7..234936c5 100644 --- a/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp +++ b/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp b/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp index 02fd8f7f..5898c6b9 100644 --- a/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp +++ b/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif From 038976991eb563c832f0cfe3fb0831440b15d24b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 31 Aug 2012 04:12:29 +0000 Subject: [PATCH 50/99] Fixed MSVC errors (from Nathan Ridge) [SVN r80326] --- .../struct/detail/define_struct_inline.hpp | 296 ++++++++++-------- 1 file changed, 162 insertions(+), 134 deletions(-) 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 a7961ec3..a27957c0 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -61,15 +61,20 @@ BOOST_PP_COMMA_IF(N) \ BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)) +#define BOOST_FUSION_ITERATOR_NAME(NAME) \ + BOOST_PP_CAT(boost_fusion_detail_, BOOST_PP_CAT(NAME, _iterator)) + // Note: all template parameter names need to be uglified, otherwise they might // shadow a template parameter of the struct when used with // BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE #define BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS(Z, N, NAME) \ - template \ - struct value_of > \ + template \ + struct value_of< \ + BOOST_FUSION_ITERATOR_NAME(NAME) \ + > \ : boost::mpl::identity< \ - typename boost_fusion_uglified_Sq::t##N##_type \ + typename boost_fusion_detail_Sq::t##N##_type \ > \ { \ }; @@ -77,10 +82,10 @@ #define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \ SPEC_TYPE, CALL_ARG_TYPE, TYPE_QUAL, ATTRIBUTE, N) \ \ - template \ + template \ struct deref > \ { \ - typedef typename boost_fusion_uglified_Sq::t##N##_type TYPE_QUAL& type; \ + typedef typename boost_fusion_detail_Sq::t##N##_type TYPE_QUAL& type; \ static type call(CALL_ARG_TYPE, N> const& iter) \ { \ return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ @@ -89,48 +94,48 @@ #define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS(R, NAME, N, ATTRIBUTE) \ BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \ - BOOST_PP_CAT(NAME, _iterator) \ - struct value_at > \ + template \ + struct value_at > \ { \ - typedef typename boost_fusion_uglified_Sq::t##N##_type type; \ + typedef typename boost_fusion_detail_Sq::t##N##_type type; \ }; #define BOOST_FUSION_MAKE_AT_SPECS(R, DATA, N, ATTRIBUTE) \ - template \ - struct at > \ + template \ + struct at > \ { \ typedef typename boost::mpl::if_< \ - boost::is_const, \ - typename boost_fusion_uglified_Sq::t##N##_type const&, \ - typename boost_fusion_uglified_Sq::t##N##_type& \ + boost::is_const, \ + typename boost_fusion_detail_Sq::t##N##_type const&, \ + typename boost_fusion_detail_Sq::t##N##_type& \ >::type type; \ \ - static type call(boost_fusion_uglified_Sq& sq) \ + static type call(boost_fusion_detail_Sq& sq) \ { \ return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ } \ @@ -142,7 +147,11 @@ #define BOOST_FUSION_MAKE_DATA_MEMBER(R, DATA, N, ATTRIBUTE) \ BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); +// Note: We can't nest the iterator inside the struct because we run into +// a MSVC10 bug involving partial specializations of nested templates. + #define BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \ struct NAME : boost::fusion::sequence_facade< \ NAME, \ boost::fusion::random_access_traversal_tag \ @@ -154,6 +163,8 @@ #define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL( \ TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES) \ \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \ + \ template < \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL( \ (0)TEMPLATE_PARAMS_SEQ) \ @@ -179,6 +190,113 @@ ATTRIBUTES_SEQ, \ BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)) +#define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL( \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END)) + +#define BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(NAME, ATTRIBUTES_SEQ) \ + BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ + NAME, \ + ATTRIBUTES_SEQ, \ + BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)) + +#define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ + \ + template \ + struct BOOST_FUSION_ITERATOR_NAME(NAME) \ + : boost::fusion::iterator_facade< \ + BOOST_FUSION_ITERATOR_NAME(NAME), \ + boost::fusion::random_access_traversal_tag \ + > \ + { \ + typedef boost::mpl::int_ index; \ + typedef boost_fusion_detail_Seq sequence_type; \ + \ + BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \ + : seq_(seq) {} \ + \ + boost_fusion_detail_Seq& seq_; \ + \ + template struct value_of; \ + BOOST_PP_REPEAT( \ + ATTRIBUTES_SEQ_SIZE, \ + BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \ + NAME) \ + \ + template struct deref; \ + BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \ + NAME, \ + ATTRIBUTES_SEQ) \ + \ + template \ + struct next \ + { \ + typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \ + typename boost_fusion_detail_It::sequence_type, \ + boost_fusion_detail_It::index::value + 1 \ + > type; \ + \ + static type call(boost_fusion_detail_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + \ + template \ + struct prior \ + { \ + typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \ + typename boost_fusion_detail_It::sequence_type, \ + boost_fusion_detail_It::index::value - 1 \ + > type; \ + \ + static type call(boost_fusion_detail_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + \ + template < \ + typename boost_fusion_detail_It1, \ + typename boost_fusion_detail_It2 \ + > \ + struct distance \ + { \ + typedef typename boost::mpl::minus< \ + typename boost_fusion_detail_It2::index, \ + typename boost_fusion_detail_It1::index \ + >::type type; \ + \ + static type call(boost_fusion_detail_It1 const& it1, \ + boost_fusion_detail_It2 const& it2) \ + { \ + return type(); \ + } \ + }; \ + \ + template < \ + typename boost_fusion_detail_It, \ + typename boost_fusion_detail_M \ + > \ + struct advance \ + { \ + typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \ + typename boost_fusion_detail_It::sequence_type, \ + boost_fusion_detail_It::index::value \ + + boost_fusion_detail_M::value \ + > type; \ + \ + static type call(boost_fusion_detail_It const& it) \ + { \ + return type(it.seq_); \ + } \ + }; \ + }; + + #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ \ @@ -197,152 +315,62 @@ BOOST_FUSION_IGNORE_2) \ (NAME, ATTRIBUTES_SEQ) \ \ - template \ - NAME(const boost_fusion_uglified_Seq& rhs) \ + template \ + NAME(const boost_fusion_detail_Seq& rhs) \ { \ boost::fusion::copy(rhs, *this); \ } \ \ - template \ - NAME& operator=(const boost_fusion_uglified_Seq& rhs) \ + template \ + NAME& operator=(const boost_fusion_detail_Seq& rhs) \ { \ boost::fusion::copy(rhs, *this); \ return *this; \ } \ \ - template \ - struct NAME##_iterator \ - : boost::fusion::iterator_facade< \ - NAME##_iterator, \ - boost::fusion::random_access_traversal_tag \ - > \ - { \ - typedef boost::mpl::int_ index; \ - typedef boost_fusion_uglified_Seq sequence_type; \ - \ - NAME##_iterator(boost_fusion_uglified_Seq& seq) : seq_(seq) {} \ - \ - boost_fusion_uglified_Seq& seq_; \ - \ - template struct value_of; \ - BOOST_PP_REPEAT( \ - ATTRIBUTES_SEQ_SIZE, \ - BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \ - NAME) \ - \ - template struct deref; \ - BOOST_PP_SEQ_FOR_EACH_I( \ - BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \ - NAME, \ - ATTRIBUTES_SEQ) \ - \ - template \ - struct next \ - { \ - typedef NAME##_iterator< \ - typename boost_fusion_uglified_It::sequence_type, \ - boost_fusion_uglified_It::index::value + 1 \ - > type; \ - \ - static type call(boost_fusion_uglified_It const& it) \ - { \ - return type(it.seq_); \ - } \ - }; \ - \ - template \ - struct prior \ - { \ - typedef NAME##_iterator< \ - typename boost_fusion_uglified_It::sequence_type, \ - boost_fusion_uglified_It::index::value - 1 \ - > type; \ - \ - static type call(boost_fusion_uglified_It const& it) \ - { \ - return type(it.seq_); \ - } \ - }; \ - \ - template < \ - typename boost_fusion_uglified_It1, \ - typename boost_fusion_uglified_It2 \ - > \ - struct distance \ - { \ - typedef typename boost::mpl::minus< \ - typename boost_fusion_uglified_It2::index, \ - typename boost_fusion_uglified_It1::index \ - >::type type; \ - \ - static type call(boost_fusion_uglified_It1 const& it1, \ - boost_fusion_uglified_It2 const& it2) \ - { \ - return type(); \ - } \ - }; \ - \ - template < \ - typename boost_fusion_uglified_It, \ - typename boost_fusion_uglified_M \ - > \ - struct advance \ - { \ - typedef NAME##_iterator< \ - typename boost_fusion_uglified_It::sequence_type, \ - boost_fusion_uglified_It::index::value \ - + boost_fusion_uglified_M::value \ - > type; \ - \ - static type call(boost_fusion_uglified_It const& it) \ - { \ - return type(it.seq_); \ - } \ - }; \ - }; \ - \ - template \ + template \ struct begin \ { \ - typedef NAME##_iterator type; \ + typedef BOOST_FUSION_ITERATOR_NAME(NAME) \ + type; \ \ - static type call(boost_fusion_uglified_Sq& sq) \ + static type call(boost_fusion_detail_Sq& sq) \ { \ return type(sq); \ } \ }; \ \ - template \ + template \ struct end \ { \ - typedef NAME##_iterator< \ - boost_fusion_uglified_Sq, \ + typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \ + boost_fusion_detail_Sq, \ ATTRIBUTES_SEQ_SIZE \ > type; \ \ - static type call(boost_fusion_uglified_Sq& sq) \ + static type call(boost_fusion_detail_Sq& sq) \ { \ return type(sq); \ } \ }; \ \ - template \ + template \ struct size : boost::mpl::int_ \ { \ }; \ \ - template \ + template \ struct empty : boost::mpl::bool_ \ { \ }; \ \ template < \ - typename boost_fusion_uglified_Sq, \ - typename boost_fusion_uglified_N \ + typename boost_fusion_detail_Sq, \ + typename boost_fusion_detail_N \ > \ struct value_at : value_at< \ - boost_fusion_uglified_Sq, \ - boost::mpl::int_ \ + boost_fusion_detail_Sq, \ + boost::mpl::int_ \ > \ { \ }; \ @@ -353,12 +381,12 @@ ~) \ \ template < \ - typename boost_fusion_uglified_Sq, \ - typename boost_fusion_uglified_N \ + typename boost_fusion_detail_Sq, \ + typename boost_fusion_detail_N \ > \ struct at : at< \ - boost_fusion_uglified_Sq, \ - boost::mpl::int_ \ + boost_fusion_detail_Sq, \ + boost::mpl::int_ \ > \ { \ }; \ From 16de1dcd019c3569882e5a4452f28f0022caa398 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 31 Aug 2012 14:32:08 +0000 Subject: [PATCH 51/99] Added move ctors for vector and deque (deque for gcc partially working for now) [SVN r80330] --- test/Jamfile | 1 + test/sequence/deque_copy.cpp | 2 +- test/sequence/deque_move.cpp | 32 +++++++++ test/sequence/move.hpp | 118 ++++++++++++++++++++++++++++++++++ test/sequence/vector_move.cpp | 31 +++++++++ 5 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 test/sequence/deque_move.cpp create mode 100644 test/sequence/move.hpp create mode 100644 test/sequence/vector_move.cpp diff --git a/test/Jamfile b/test/Jamfile index 21fd42dd..f491d9a8 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -109,6 +109,7 @@ import testing ; [ run sequence/vector_iterator.cpp : : : : ] [ run sequence/vector_make.cpp : : : : ] [ run sequence/vector_misc.cpp : : : : ] + [ run sequence/vector_move.cpp : : : : ] [ run sequence/vector_mutate.cpp : : : : ] [ run sequence/vector_n.cpp : : : : ] [ run sequence/vector_tie.cpp : : : : ] diff --git a/test/sequence/deque_copy.cpp b/test/sequence/deque_copy.cpp index 2cf4a8eb..e9f2b91f 100644 --- a/test/sequence/deque_copy.cpp +++ b/test/sequence/deque_copy.cpp @@ -3,7 +3,7 @@ Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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/deque_move.cpp b/test/sequence/deque_move.cpp new file mode 100644 index 00000000..42fda2d9 --- /dev/null +++ b/test/sequence/deque_move.cpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2012 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) +==============================================================================*/ +#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ + + +#include + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + +#include + +#define FUSION_SEQUENCE boost::fusion::deque +#include "move.hpp" + +#else +#include +#endif + +int +main() +{ +#if !defined(BOOST_NO_RVALUE_REFERENCES) + test(); +#endif + + return boost::report_errors(); +} + diff --git a/test/sequence/move.hpp b/test/sequence/move.hpp new file mode 100644 index 00000000..c3ce1111 --- /dev/null +++ b/test/sequence/move.hpp @@ -0,0 +1,118 @@ +/*============================================================================= + Copyright (c) 2012 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_RVALUE_REFERENCES) +#error "Valid only on compilers that support rvalues" +#endif + +#include +#include +#include +#include +#include + + +namespace test_detail +{ + int copies = 0; + + void incr_copy() + { + copies++; + } + + struct x //: boost::noncopyable + { + int i; + x() : i(123) {} + + x(x&& rhs) : i(rhs.i) {} + + x& operator=(x&& rhs) + { + i = rhs.i; + return *this; + } + + x(x const& rhs) + { + incr_copy(); + } + + x& operator=(x const& rhs) + { + incr_copy(); + return *this; + } + }; + + typedef std::vector vector_type; + extern bool disable_rvo; // to disable RVO + + vector_type + generate_vec() + { + vector_type v; + v.push_back(x()); + if (disable_rvo) + return v; + return vector_type(); + } + + + template + T move_me(T && val) + { + T r(std::move(val)); + if (disable_rvo) + return r; + return T(); + } + + typedef FUSION_SEQUENCE> return_type; + + return_type + generate() + { + return_type r(generate_vec()); + if (disable_rvo) + return r; + return return_type(); + } + + typedef FUSION_SEQUENCE, x> return_type2; + + return_type2 + generate2() + { + return_type2 r(generate_vec(), x()); + if (disable_rvo) + return r; + return return_type2(); + } +} + +void test() +{ + using namespace boost::fusion; + using namespace test_detail; + + return_type v = move_me(generate()); + BOOST_TEST(copies == 0); + + return_type2 v2 = move_me(generate2()); + BOOST_TEST(copies == 0); + + std::cout << "Copies: " << copies << std::endl; +} + +namespace test_detail +{ + bool disable_rvo = true; +} + diff --git a/test/sequence/vector_move.cpp b/test/sequence/vector_move.cpp new file mode 100644 index 00000000..70483f06 --- /dev/null +++ b/test/sequence/vector_move.cpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2012 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) +==============================================================================*/ +#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ + +#include + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + +#include + +#define FUSION_SEQUENCE boost::fusion::vector +#include "move.hpp" + +#else +#include +#endif + +int +main() +{ +#if !defined(BOOST_NO_RVALUE_REFERENCES) + test(); +#endif + + return boost::report_errors(); +} + From c8b47ca3ca8b1dcb312d98150a53fa01e08012e1 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 31 Aug 2012 14:33:12 +0000 Subject: [PATCH 52/99] Added move ctors for vector and deque (deque for gcc partially working for now) no preprocessed files yet [SVN r80331] --- .../boost/fusion/container/deque/deque.hpp | 28 +++++++++++++-- .../container/deque/detail/cpp03_deque.hpp | 26 ++++++++++++-- .../deque/detail/cpp03_deque_keyed_values.hpp | 5 +++ .../deque/detail/deque_forward_ctor.hpp | 12 ++++++- .../deque/detail/deque_keyed_values_call.hpp | 18 +++++++++- .../container/deque/detail/keyed_element.hpp | 34 +++++++++++++++++-- .../vector/detail/vector_forward_ctor.hpp | 13 ++++++- .../container/vector/detail/vector_n.hpp | 28 +++++++++++++++ .../boost/fusion/container/vector/vector.hpp | 5 +++ 9 files changed, 159 insertions(+), 10 deletions(-) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 215981e4..5ebf03d9 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -71,11 +71,35 @@ namespace boost { namespace fusion : base(seq) {} - explicit deque(typename detail::call_param::type head - , typename detail::call_param::type... tail) +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + deque(deque&& seq) + : base(std::forward>(seq)) + {} +#endif + + deque(deque const& seq) + : base(seq) + {} + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + deque(deque&& seq) + : base(std::forward(seq)) + {} +#endif + + explicit deque(Head const& head, Tail const&... tail) : base(detail::deque_keyed_values::call(head, tail...)) {} +//~ #if !defined(BOOST_NO_RVALUE_REFERENCES) + //~ template + //~ explicit deque(Head_&& head, Tail_&&... tail) + //~ : base(detail::deque_keyed_values + //~ ::call(std::forward(head), std::forward(tail)...)) + //~ {} +//~ #endif + template explicit deque(Sequence const& seq , typename disable_if >::type* /*dummy*/ = 0) diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp index 5804d890..19629fcc 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp @@ -87,13 +87,34 @@ namespace boost { namespace fusion { : base(t0, detail::nil_keyed_element()) {} + explicit deque(deque const& rhs) + : base(rhs) + {} + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + explicit deque(T0&& t0) + : base(std::forward(t0), detail::nil_keyed_element()) + {} + + explicit deque(deque&& rhs) + : base(std::forward(rhs)) + {} +#endif + template - deque(deque const& seq) + deque(deque const& seq) : base(seq) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + deque(deque&& seq) + : base(std::forward>(seq)) + {} +#endif + template - deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) + deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -112,7 +133,6 @@ namespace boost { namespace fusion { base::operator=(rhs); return *this; } - }; }} diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp index 2fee4700..d32c13a5 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp @@ -72,6 +72,11 @@ namespace boost { namespace fusion { namespace detail { return type(); } + + static type forward_() + { + return type(); + } }; template diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index b76916eb..09d10223 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -13,6 +13,8 @@ #error "C++03 only! This file should not have been included" #endif +#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward(t##n) + #include #include #include @@ -22,14 +24,22 @@ #define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() +#undef FUSION_DEQUE_FORWARD_CTOR_FORWARD #endif #else #define N BOOST_PP_ITERATION() deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) - : base(detail::deque_keyed_values::call(BOOST_PP_ENUM_PARAMS(N, t))) + : base(detail::deque_keyed_values::construct(BOOST_PP_ENUM_PARAMS(N, t))) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) + : base(detail::deque_keyed_values:: + forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) +{} +#endif + #undef N #endif diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp index f95960bc..eea7e8c3 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -15,19 +15,24 @@ #include #include +#include #include +#define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \ + std::forward(BOOST_PP_CAT(t, n)) + #define BOOST_PP_FILENAME_1 \ #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() +#undef FUSION_DEQUE_KEYED_VALUES_FORWARD #endif #else #define N BOOST_PP_ITERATION() - static type call(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) + static type construct(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) { return type(t0, deque_keyed_values_impl< @@ -38,5 +43,16 @@ >::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); } + static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) + { + return type(std::forward(t0), + deque_keyed_values_impl< + next_index + #if N > 1 + , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) + #endif + >::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _))); + } + #undef N #endif diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index d1b219de..d8f988a5 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -47,16 +47,39 @@ namespace boost { namespace fusion { namespace detail *it, base::from_iterator(fusion::next(it))); } + keyed_element(keyed_element const& rhs) + : Rest(rhs.get_base()), value_(rhs.value_) + {} + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + keyed_element(keyed_element&& rhs) + : Rest(std::forward(rhs.forward_base())) + , value_(std::forward(rhs.value_)) + {} +#endif + template keyed_element(keyed_element const& rhs) : Rest(rhs.get_base()), value_(rhs.value_) {} - Rest const get_base() const + Rest& get_base() { return *this; } + Rest const& get_base() const + { + return *this; + } + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + Rest&& forward_base() + { + return std::forward(*static_cast(this)); + } +#endif + typename cref_result::type get(Key) const { return value_; @@ -67,10 +90,17 @@ namespace boost { namespace fusion { namespace detail return value_; } - keyed_element(typename call_param::type value, Rest const& rest) + keyed_element(Value const& value, Rest const& rest) : Rest(rest), value_(value) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) + keyed_element(Value&& value, Rest&& rest) + : Rest(std::forward(rest)) + , value_(std::forward(value)) + {} +#endif + keyed_element() : Rest(), value_() {} diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp index 92f7aa6c..8d8865f1 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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) ==============================================================================*/ #ifndef BOOST_PP_IS_ITERATING @@ -12,11 +12,14 @@ #include #include +#define FUSION_FORWARD_CTOR_MOVE(z, n, _) std::move(_##n) + #define BOOST_PP_FILENAME_1 \ #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() +#undef FUSION_FORWARD_CTOR_MOVE #endif #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// @@ -34,6 +37,14 @@ N, typename detail::call_param::type _)) : vec(BOOST_PP_ENUM_PARAMS(N, _)) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if N == 1 + explicit +#endif + vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {} +#endif + #undef N #endif // defined(BOOST_PP_IS_ITERATING) diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 4e249c7f..4652303b 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -12,7 +12,10 @@ #define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n() #define FUSION_MEMBER_INIT(z, n, _) m##n(_##n) #define FUSION_COPY_INIT(z, n, _) m##n(other.m##n) +#define FUSION_MOVE_FROM_OTHER(z, n, _) m##n(std::move(other.m##n)) +#define FUSION_MOVE(z, n, _) m##n(std::move(_##n)) #define FUSION_MEMBER_DECL(z, n, _) T##n m##n; +#define FUSION_FORWARD(z, n, _) std::forward(_##n) #define FUSION_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); @@ -42,6 +45,11 @@ BOOST_PP_CAT(vector_data, N)() : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) + BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + : BOOST_PP_ENUM(N, FUSION_MOVE, _) {} +#endif + BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param::type _)) @@ -51,6 +59,12 @@ BOOST_PP_CAT(vector_data, N) const& other) : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) + BOOST_PP_CAT(vector_data, N)( + BOOST_PP_CAT(vector_data, N)&& other) + : BOOST_PP_ENUM(N, FUSION_MOVE_FROM_OTHER, _) {} +#endif + BOOST_PP_CAT(vector_data, N)& operator=(BOOST_PP_CAT(vector_data, N) const& vec) { @@ -105,6 +119,19 @@ N, typename detail::call_param::type _)) : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if (N == 1) + explicit +#endif + BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + : base_type(BOOST_PP_ENUM(N, FUSION_FORWARD, _)) {} +#endif + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs) + : base_type(std::move(rhs)) {} +#endif + template BOOST_PP_CAT(vector, N)( BOOST_PP_CAT(vector, N) const& vec) @@ -166,3 +193,4 @@ #undef N + diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 6563bc93..c672bb3e 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -106,6 +106,11 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) + vector(vector&& rhs) + : vec(std::move(rhs.vec)) {} +#endif + template vector(Sequence const& rhs) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} From 5946ab993632cab88177da660d3367c26d1a5487 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 31 Aug 2012 15:57:49 +0000 Subject: [PATCH 53/99] deque move-ctor OK on gcc [SVN r80333] --- test/Jamfile | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile b/test/Jamfile index f491d9a8..8cdd143d 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -76,6 +76,7 @@ import testing ; [ run sequence/deque_iterator.cpp : : : : ] [ run sequence/deque_make.cpp : : : : ] [ run sequence/deque_misc.cpp : : : : ] + [ run sequence/deque_move.cpp : : : : ] [ run sequence/deque_mutate.cpp : : : : ] [ run sequence/deque_tie.cpp : : : : ] [ run sequence/deque_value_at.cpp : : : : ] From 3613310b6233cb70286968570fc3ba436ae4e3b3 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 31 Aug 2012 15:58:31 +0000 Subject: [PATCH 54/99] deque move-ctor OK on gcc [SVN r80334] --- .../boost/fusion/container/deque/deque.hpp | 26 +++++++++++++------ .../deque/detail/cpp11_deque_keyed_values.hpp | 16 +++++++++--- .../container/deque/detail/keyed_element.hpp | 3 +++ 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 5ebf03d9..4920e847 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -71,6 +71,11 @@ namespace boost { namespace fusion : base(seq) {} + template + deque(deque& seq) + : base(seq) + {} + #if !defined(BOOST_NO_RVALUE_REFERENCES) template deque(deque&& seq) @@ -89,16 +94,21 @@ namespace boost { namespace fusion #endif explicit deque(Head const& head, Tail const&... tail) - : base(detail::deque_keyed_values::call(head, tail...)) + : base(detail::deque_keyed_values::construct(head, tail...)) {} -//~ #if !defined(BOOST_NO_RVALUE_REFERENCES) - //~ template - //~ explicit deque(Head_&& head, Tail_&&... tail) - //~ : base(detail::deque_keyed_values - //~ ::call(std::forward(head), std::forward(tail)...)) - //~ {} -//~ #endif + template + explicit deque(Head_ const& head, Tail_ const&... tail) + : base(detail::deque_keyed_values::construct(head, tail...)) + {} + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + explicit deque(Head_&& head, Tail_&&... tail) + : base(detail::deque_keyed_values + ::forward_(std::forward(head), std::forward(tail)...)) + {} +#endif template explicit deque(Sequence const& seq diff --git a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp index 43ed5360..dd57b3a4 100644 --- a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp @@ -28,13 +28,22 @@ namespace boost { namespace fusion { namespace detail typedef typename deque_keyed_values_impl::type tail; typedef keyed_element type; - static type call( + static type construct( typename detail::call_param::type head , typename detail::call_param::type... tail) { return type( head - , deque_keyed_values_impl::call(tail...) + , deque_keyed_values_impl::construct(tail...) + ); + } + + static type forward_(Head&& head, Tail&&... tail) + { + return type( + std::forward(head) + , deque_keyed_values_impl:: + forward_(std::forward(tail)...) ); } }; @@ -45,7 +54,8 @@ namespace boost { namespace fusion { namespace detail struct deque_keyed_values_impl { typedef nil_keyed_element type; - static type call() { return type(); } + static type construct() { return type(); } + static type forward_() { return type(); } }; template diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index d8f988a5..2123b107 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -63,6 +63,9 @@ namespace boost { namespace fusion { namespace detail : Rest(rhs.get_base()), value_(rhs.value_) {} +#if !defined(BOOST_NO_RVALUE_REFERENCES) +#endif + Rest& get_base() { return *this; From e587ad4d502cc5ad94a2ccf58bb0826a029bb894 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 1 Sep 2012 01:02:46 +0000 Subject: [PATCH 55/99] Added move-assign test [SVN r80343] --- test/sequence/move.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/sequence/move.hpp b/test/sequence/move.hpp index c3ce1111..568cfd89 100644 --- a/test/sequence/move.hpp +++ b/test/sequence/move.hpp @@ -108,6 +108,9 @@ void test() return_type2 v2 = move_me(generate2()); BOOST_TEST(copies == 0); + v2 = move_me(generate2()); + BOOST_TEST(copies == 0); + std::cout << "Copies: " << copies << std::endl; } From 705ca2b61bfd2f4cfee693a3d8311b19bc2ae60d Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 1 Sep 2012 01:04:12 +0000 Subject: [PATCH 56/99] move-assign for deque [SVN r80344] --- .../boost/fusion/container/deque/deque.hpp | 17 ++++++++++++++++ .../container/deque/detail/cpp03_deque.hpp | 20 +++++++++++++++++++ .../container/deque/detail/keyed_element.hpp | 17 ++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 4920e847..fe3754d2 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -129,6 +129,23 @@ namespace boost { namespace fusion base::operator=(rhs); return *this; } + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + deque& operator=(deque&& rhs) + { + base::operator=(std::forward>(rhs)); + return *this; + } + + template + deque& operator=(T&& rhs) + { + base::operator=(std::forward(rhs)); + return *this; + } +#endif + }; }} diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp index 19629fcc..36832b57 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp @@ -133,6 +133,26 @@ namespace boost { namespace fusion { base::operator=(rhs); return *this; } + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + deque& + operator=(deque&& rhs) + { + base::operator=(std::forward< + deque>(rhs)); + return *this; + } + + template + deque& + operator=(T&& rhs) + { + base::operator=(std::forward(rhs)); + return *this; + } +#endif + }; }} diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index 2123b107..f6250748 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -123,6 +123,23 @@ namespace boost { namespace fusion { namespace detail return *this; } +#if !defined(BOOST_NO_RVALUE_REFERENCES) + template + keyed_element& operator=(keyed_element&& rhs) + { + base::operator=(std::forward>(rhs)); + value_ = std::forward(rhs.value_); + return *this; + } + + keyed_element& operator=(keyed_element&& rhs) + { + base::operator=(std::forward(rhs)); + value_ = std::forward(rhs.value_); + return *this; + } +#endif + Value value_; }; From a53f93ff1ab1f6a03b829386665c4860c3e0ff90 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 1 Sep 2012 02:01:26 +0000 Subject: [PATCH 57/99] move-assign for vector [SVN r80345] --- .../boost/fusion/container/deque/deque.hpp | 7 -- .../container/deque/detail/cpp03_deque.hpp | 9 --- .../container/deque/detail/keyed_element.hpp | 8 --- .../container/vector/detail/vector_n.hpp | 65 +++++++++++-------- .../boost/fusion/container/vector/vector.hpp | 19 +++++- 5 files changed, 57 insertions(+), 51 deletions(-) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index fe3754d2..e826394f 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -131,13 +131,6 @@ namespace boost { namespace fusion } #if !defined(BOOST_NO_RVALUE_REFERENCES) - template - deque& operator=(deque&& rhs) - { - base::operator=(std::forward>(rhs)); - return *this; - } - template deque& operator=(T&& rhs) { diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp index 36832b57..dcc1e3c3 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03_deque.hpp @@ -135,15 +135,6 @@ namespace boost { namespace fusion { } #if !defined(BOOST_NO_RVALUE_REFERENCES) - template - deque& - operator=(deque&& rhs) - { - base::operator=(std::forward< - deque>(rhs)); - return *this; - } - template deque& operator=(T&& rhs) diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index f6250748..4dc60500 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -124,14 +124,6 @@ namespace boost { namespace fusion { namespace detail } #if !defined(BOOST_NO_RVALUE_REFERENCES) - template - keyed_element& operator=(keyed_element&& rhs) - { - base::operator=(std::forward>(rhs)); - value_ = std::forward(rhs.value_); - return *this; - } - keyed_element& operator=(keyed_element&& rhs) { base::operator=(std::forward(rhs)); diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 4652303b..539b47fa 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -9,27 +9,31 @@ #if !defined(FUSION_MACRO_05042005) #define FUSION_MACRO_05042005 -#define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n() -#define FUSION_MEMBER_INIT(z, n, _) m##n(_##n) -#define FUSION_COPY_INIT(z, n, _) m##n(other.m##n) -#define FUSION_MOVE_FROM_OTHER(z, n, _) m##n(std::move(other.m##n)) -#define FUSION_MOVE(z, n, _) m##n(std::move(_##n)) -#define FUSION_MEMBER_DECL(z, n, _) T##n m##n; -#define FUSION_FORWARD(z, n, _) std::forward(_##n) +#define FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT(z, n, _) m##n() +#define FUSION_VECTOR_MEMBER_MEMBER_INIT(z, n, _) m##n(_##n) +#define FUSION_VECTOR_MEMBER_COPY_INIT(z, n, _) m##n(other.m##n) +#define FUSION_VECTOR_MEMBER_FWD(z, n, _) m##n(std::forward(other.m##n)) +#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward(_##n)) +#define FUSION_VECTOR_MEMBER_MEMBER_DECL(z, n, _) T##n m##n; +#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward(_##n) -#define FUSION_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_MEMBER_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); -#define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n); -#define FUSION_AT_IMPL(z, n, _) \ +#define FUSION_VECTOR_MEMBER_MEMBER_FORWARD(z, n, _) \ + this->BOOST_PP_CAT(m, n) = std::forward< \ + BOOST_PP_CAT(T, n)>(vec.BOOST_PP_CAT(m, n)); + +#define FUSION_VECTOR_MEMBER_AT_IMPL(z, n, _) \ typename add_reference::type \ at_impl(mpl::int_) { return this->m##n; } \ typename add_reference::type>::type \ at_impl(mpl::int_) const { return this->m##n; } -#define FUSION_ITER_DECL_VAR(z, n, _) \ +#define FUSION_VECTOR_MEMBER_ITER_DECL_VAR(z, n, _) \ typedef typename result_of::next< \ BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \ BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \ @@ -43,32 +47,32 @@ struct BOOST_PP_CAT(vector_data, N) { BOOST_PP_CAT(vector_data, N)() - : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT, _) {} #if !defined(BOOST_NO_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) - : BOOST_PP_ENUM(N, FUSION_MOVE, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {} #endif BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param::type _)) - : BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N) const& other) - : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_COPY_INIT, _) {} #if !defined(BOOST_NO_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N)&& other) - : BOOST_PP_ENUM(N, FUSION_MOVE_FROM_OTHER, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FWD, _) {} #endif BOOST_PP_CAT(vector_data, N)& operator=(BOOST_PP_CAT(vector_data, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) return *this; } @@ -78,7 +82,7 @@ { typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(seq); - BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_VECTOR_MEMBER_ITER_DECL_VAR, _) return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } @@ -88,11 +92,11 @@ { typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(seq); - BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_VECTOR_MEMBER_ITER_DECL_VAR, _) return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } - BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_DECL, _) }; template @@ -124,12 +128,12 @@ explicit #endif BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) - : base_type(BOOST_PP_ENUM(N, FUSION_FORWARD, _)) {} + : base_type(BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FORWARD, _)) {} #endif #if !defined(BOOST_NO_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs) - : base_type(std::move(rhs)) {} + : base_type(std::forward(rhs)) {} #endif template @@ -159,7 +163,7 @@ BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) return *this; } @@ -169,12 +173,21 @@ { typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(seq); - BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) - BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_VECTOR_MEMBER_ITER_DECL_VAR, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN, _) return *this; } - BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _) +#if !defined(BOOST_NO_RVALUE_REFERENCES) + BOOST_PP_CAT(vector, N)& + operator=(BOOST_PP_CAT(vector, N)&& vec) + { + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_FORWARD, _) + return *this; + } +#endif + + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_AT_IMPL, _) template typename add_reference::type>::type diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index c672bb3e..36c1b7ac 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -108,7 +108,7 @@ namespace boost { namespace fusion #if !defined(BOOST_NO_RVALUE_REFERENCES) vector(vector&& rhs) - : vec(std::move(rhs.vec)) {} + : vec(std::forward(rhs.vec)) {} #endif template @@ -140,6 +140,23 @@ namespace boost { namespace fusion return *this; } +#if !defined(BOOST_NO_RVALUE_REFERENCES) + vector& + operator=(vector&& rhs) + { + vec = std::forward(rhs.vec); + return *this; + } + + template + vector& + operator=(T&& rhs) + { + vec = std::forward(rhs); + return *this; + } +#endif + template typename add_reference< typename mpl::at_c::type From 26ba07f36cc37f93a1f4739ad79dd044ff48b5ba Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 1 Sep 2012 02:02:09 +0000 Subject: [PATCH 58/99] move-assign test tweaks [SVN r80346] --- test/Jamfile | 2 +- test/sequence/move.hpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 8cdd143d..5d68124a 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -136,7 +136,7 @@ import testing ; [ run sequence/define_struct.cpp : : : : ] [ run sequence/define_struct_inline.cpp : : : : ] [ run sequence/define_assoc_struct.cpp : : : : ] - [ run sequence/define_tpl_struct.cpp : : : : ] + [ run sequence/define_tpl_struct.cpp : : : : ] [ run sequence/define_tpl_struct_inline.cpp : : : : ] [ run sequence/define_assoc_tpl_struct.cpp : : : : ] [ run sequence/std_tuple_iterator.cpp : : : : ] diff --git a/test/sequence/move.hpp b/test/sequence/move.hpp index 568cfd89..b96a60e7 100644 --- a/test/sequence/move.hpp +++ b/test/sequence/move.hpp @@ -11,7 +11,6 @@ #endif #include -#include #include #include #include @@ -26,7 +25,7 @@ namespace test_detail copies++; } - struct x //: boost::noncopyable + struct x { int i; x() : i(123) {} From 4382b64aa78d9979a0fc0acd0576a9c731346c8e Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 1 Sep 2012 02:12:46 +0000 Subject: [PATCH 59/99] Updated changelog removed unmaintained todo.txt [SVN r80347] --- doc/changelog.qbk | 3 + todo.txt | 185 ---------------------------------------------- 2 files changed, 3 insertions(+), 185 deletions(-) delete mode 100644 todo.txt diff --git a/doc/changelog.qbk b/doc/changelog.qbk index 9bccc0c0..e9ee2565 100644 --- a/doc/changelog.qbk +++ b/doc/changelog.qbk @@ -45,5 +45,8 @@ This section summarizes significant changes to the Fusion library. compilation (Joel de Guzman) * October 8, 2011: Added adaptor for std::tuple (Joel de Guzman) * October 10, 2011: Made map random access (Brandon Kohn) +* April 7, 2012: Added C++11 version of deque +* May 19, 2012: Added BOOST_FUSION_DEFINE_STRUCT_INLINE by Nathan Ridge +* September 1, 2012: Added move support for deque and vector [endsect] diff --git a/todo.txt b/todo.txt deleted file mode 100644 index 2add4cc8..00000000 --- a/todo.txt +++ /dev/null @@ -1,185 +0,0 @@ -=============================================================================== -Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger - -Use, modification and distribution is subject to 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) -=============================================================================== - -* Document extension::struct_size, extension::struct_member and - extension::struct_assoc_member in extension section. - -* Document rationale behind at and value_at and how to choose which - to use. - -* Reinstate the function object algorithms - -* Break all dependency cycles if there are some more - -* Break the view<-->algorithm dependency cycle - -* Improve extension docs - -* Document sequence/convert - -* Consider object equivalent of functions and algorithms (so you can do - transform(iterators, deref()) with needing to put together a wrapper for deref). - -* Make algorithms work with mutable data - -* Consider segmented sequence / algorithm support - -* Consider utility element_ref::type thats consts and refs as appropriate - -* Improved motivation section - -* Expand details of view concept - -* Examples, examples, examples - -* look at lambda stuff - -* Complete the fusion/include/ directory containing a flat list of - include files for all the modules and components. - -* The error messages when e.g. the function is not set as const are difficult - to decipher. e.g. transform(s, f) <<- where f has a non-const operator() - -* mpl, fusion, container type preserving operations incompatible - -- shall we consider container-type preserving variations of the - functions/algorithms? - - How about making joint_view Concept preserving? This way push/pop/front/back - will return a view of the same Concept. - tosh - -* map_tie is implemented. It seems not yet documented? - Dan: done now! - -* multi_set, multi_map? - -* why is insert_range not spelled insert_sequence ? - -* Document the new fusion extension mechanisms - ->iterator_facade - ->sequence_facade - -* David A: - Wouldn't extension be a lot easier if iterator_base and sequence_base - took (optional) 2nd arguments that specify the tag? Then you wouldn't - need that whole dance that enables tag dispatching (right?) - -* David A: is_iterator isn't documented? - JDG: There is no is_iterator ;) There is is_fusion_iterator, but it should - probably be placed in detail. - -* for_each takes the function object by reference to const, so you have to - const qualify operator() and make the data members mutable so you can change - them anyway. - Eric N: IMO, this is a bug in Fusion. There should be an overload of for_each - that takes a function object by non-const reference. Stateful predicates should - be supported, and Fusion should be explicit about where and when predicates - are copied, so that the state doesn't get messed up. - -* Make Boost.parameters library's ArgumentPacks a conforming fusion sequence - -* Optimize container performance with typeof / compiler defect typeof. In particular - improve the performance of the prototype deque implementation. - -* Deque docs if we decide we like it - -* Rewrite the whole extension docs section. More formal docs of extension point, - example to use the various facade types, rather than hand coding everything. - -* zip optimization - Zip is rather compiler heavy, try and reduce the likelihood - of compilers like msvc7 hitting internal compiler limits - -* Document the unused support added to zip for Hartmut. - -* Rationalize support/unused.hpp and the ignore stuff needed for tie etc. - -* Why do we need to set FUSION_MAX_VECTOR_SIZE when we set - FUSION_MAX_MAP_SIZE? Setting FUSION_MAX_MAP_SIZE should be enough. - -tosh: - -* Document Incrementable / Single Pass Concepts -* Provide infinity-aware default implementation for Incrementable Sequences - - Thoughts: It would probably be cleaner to have infinity conceptually - orthogonal so there can be infinite Bidi/RA/Assoc Sequences. - OTOH it complicates things in way that might not be worth it... - -* Implement always_view/always with repetitive_view > - semantics - using repetitive_view will for this purpose will be way - too much overhead. - -? Functional wrappers for intrinsics/algorithms. - -* Rewrite functional benchmark - -========================================================== - -From the fusion review (please mark all done items): - -The following comments refer to issues that the library authors should -address prior to merging the library into CVS: - -* Documentation: Many of the reviewers stated that they would like to - see more tutorial documentation that demonstrates not only what the - particular constructs in Fusion do, but also how they are expected - to be used. A reasonably concise motivating example has been - requested. It has already been pointed out that Fusion is used for - some other boost libraries. A well-developed and self-contained - case study of when and how to use Fusion would be greatly - appreciated. The relationship between this library and the current - Boost.Tuple library, as well as Boost.Mpl, should be discussed. The - reference documentation is quite thorough and detailed comments - regarding them have already been addressed by the authors. However - the notion of "views" requires greater documentation. The - examples in the algorithm sections currently do little more than - demonstrate the syntax by which they can be called. Examples that - more specifically express intent would be a notable - improvement. (see for example Matt Austern's "Generic Programming - and the STL"). In general the documentation would benefit from - copy-editing. - -* Several commented on the use of the name "pair" for the fusion type - that has typedefs for two types but only contains the second type. - Although the typedefs and member names are consistent with the - std::pair object, the name "pair" is confusing. The - compile-time/run-time hybrid nature of this library makes it - difficult to find perfect metaphors for constructs in the library. - In this case, it seems better to find a term for this template (and - the concept that it models) that more directly states its purpose. - The name "tag_of" would also benefit from renaming. - -* The behavior of Fusion functions in the face of argument-dependent - lookup (ADL) is not well specified. This should be made - explicit in the reference documentation. - -The following comments refer to issues that, while not mandatory, -deserve consideration: - -* The library name "Fusion", though not arbitrary, says little about - the library's purpose. There is precedent for this within boost, - however. A name change is not mandatory for the - library's acceptance, but it would be worth while for the authors to - consider a more telling name. - - Dan - I like the name Fusion, and there is precendent for less direct - library names like Spirit and Xpressive in Boost. (And Boost is not - exactly an explicit name either). - -* The mechanism for extending Fusion with new containers and iterators - is complex and involves implementing a number of components, - especially regarding iterators. An adaptation layer that is - analogous to the Boost.Iterator library would be a fine addition to - Fusion. - - Dan - Joel added iterator and container adapters, still to be documented - as part of the improved extension docs to be done by me. - -* It would be beneficial to supply Boost.Serialization support for the - Fusion container types. I am sure, as mentioned, that the authors - of this library would accept a volunteer to implement this - functionality. - From 106702d388092090d9a546fdeeee6ff11db48936 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 3 Sep 2012 07:08:47 +0000 Subject: [PATCH 60/99] Fix to silence MSVC warnings (Nathan Ridge) [SVN r80368] --- .../fusion/adapted/struct/detail/define_struct_inline.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 a27957c0..6e3630a3 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -184,11 +185,14 @@ NAME, \ BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END)) +// Note: can't compute BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ) directly because +// ATTRIBUTES_SEQ may be empty and calling BOOST_PP_SEQ_SIZE on an empty +// sequence produces warnings on MSVC. #define BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL(NAME, ATTRIBUTES_SEQ) \ BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ NAME, \ ATTRIBUTES_SEQ, \ - BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)) + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ))) #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \ BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL( \ From 35ec74edbcf5bbb55911f33c922e8eab26168f21 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 4 Sep 2012 05:04:25 +0000 Subject: [PATCH 61/99] C++11 fixes for deque [SVN r80391] --- test/Jamfile | 6 ++++++ test/sequence/construction.hpp | 2 +- test/sequence/iterator.hpp | 13 +++++++++++++ test/sequence/tuple_construction.cpp | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 5d68124a..b372d6b2 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -8,6 +8,12 @@ # bring in rules for testing import testing ; +project + : requirements + gcc:-std=c++0x + darwin:-std=c++0x + ; + { test-suite fusion : diff --git a/test/sequence/construction.hpp b/test/sequence/construction.hpp index 380a9eed..57ba5301 100644 --- a/test/sequence/construction.hpp +++ b/test/sequence/construction.hpp @@ -57,7 +57,7 @@ test() FUSION_SEQUENCE<> empty0; -#ifndef TR1_TUPLE_TEST +#ifndef NO_CONSTRUCT_FROM_NIL FUSION_SEQUENCE<> empty1(empty); #endif diff --git a/test/sequence/iterator.hpp b/test/sequence/iterator.hpp index ab29b8a0..c5364cb8 100644 --- a/test/sequence/iterator.hpp +++ b/test/sequence/iterator.hpp @@ -29,7 +29,11 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE seq_type; +#if !defined(BOOST_NO_RVALUE_REFERENCES) + seq_type v(1, 'x', 3.3, std::move(s)); +#else seq_type v(1, 'x', 3.3, s); +#endif boost::fusion::result_of::begin::type i(v); BOOST_TEST(*i == 1); @@ -61,7 +65,12 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE const seq_type; +#if !defined(BOOST_NO_RVALUE_REFERENCES) + seq_type t(1, 'x', 3.3, std::move(s)); +#else seq_type t(1, 'x', 3.3, s); +#endif + boost::fusion::result_of::begin::type i(t); BOOST_TEST(*i == 1); @@ -104,7 +113,11 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE seq_type; +#if !defined(BOOST_NO_RVALUE_REFERENCES) + seq_type t(1, 'x', 3.3, std::move(s)); +#else seq_type t(1, 'x', 3.3, s); +#endif boost::fusion::result_of::begin::type i(t); BOOST_TEST(*i == 1); diff --git a/test/sequence/tuple_construction.cpp b/test/sequence/tuple_construction.cpp index b35233ab..044701c4 100644 --- a/test/sequence/tuple_construction.cpp +++ b/test/sequence/tuple_construction.cpp @@ -8,7 +8,7 @@ #include #include -#define TR1_TUPLE_TEST +#define NO_CONSTRUCT_FROM_NIL #define FUSION_SEQUENCE tuple #define FUSION_AT get #include "construction.hpp" From 80799eed9583c02bcc29f836edb6bae718390a5e Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 4 Sep 2012 05:04:26 +0000 Subject: [PATCH 62/99] C++11 fixes for deque [SVN r80392] --- .../boost/fusion/container/deque/deque.hpp | 37 ++++++++++++++----- .../fusion/container/deque/deque_fwd.hpp | 6 +-- .../deque/detail/deque_forward_ctor.hpp | 2 +- .../deque/detail/deque_initial_size.hpp | 2 +- .../deque/detail/deque_keyed_values_call.hpp | 2 +- .../detail/{cpp03_deque.hpp => pp_deque.hpp} | 8 ++-- .../{cpp03_deque_fwd.hpp => pp_deque_fwd.hpp} | 6 +-- ...d_values.hpp => pp_deque_keyed_values.hpp} | 2 +- ...es.hpp => variadic_deque_keyed_values.hpp} | 0 .../boost/fusion/container/deque/limits.hpp | 2 +- 10 files changed, 42 insertions(+), 25 deletions(-) rename include/boost/fusion/container/deque/detail/{cpp03_deque.hpp => pp_deque.hpp} (96%) rename include/boost/fusion/container/deque/detail/{cpp03_deque_fwd.hpp => pp_deque_fwd.hpp} (92%) rename include/boost/fusion/container/deque/detail/{cpp03_deque_keyed_values.hpp => pp_deque_keyed_values.hpp} (98%) rename include/boost/fusion/container/deque/detail/{cpp11_deque_keyed_values.hpp => variadic_deque_keyed_values.hpp} (100%) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index e826394f..56ae290e 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -11,24 +11,23 @@ #include /////////////////////////////////////////////////////////////////////////////// -// With no decltype and variadics, we will use the C++03 version +// With variadics, we will use the PP version version /////////////////////////////////////////////////////////////////////////////// -#if (defined(BOOST_NO_DECLTYPE) \ - || defined(BOOST_NO_VARIADIC_TEMPLATES) \ - || defined(BOOST_NO_RVALUE_REFERENCES)) -# include +#if defined(BOOST_NO_VARIADIC_TEMPLATES) +# include #else -# if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) -# define BOOST_FUSION_HAS_CPP11_DEQUE +# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# define BOOST_FUSION_HAS_VARIADIC_DEQUE # endif /////////////////////////////////////////////////////////////////////////////// -// C++11 interface +// C++11 variadic interface /////////////////////////////////////////////////////////////////////////////// #include #include +#include #include -#include +#include #include #include #include @@ -36,8 +35,10 @@ #include #include #include +#include #include +#include #include #include @@ -48,6 +49,22 @@ namespace boost { namespace fusion template struct deque : detail::nil_keyed_element { + typedef deque_tag fusion_tag; + typedef bidirectional_traversal_tag category; + typedef mpl::int_<0> size; + typedef mpl::int_<0> next_up; + typedef mpl::int_<0> next_down; + typedef mpl::false_ is_view; + + template + deque(Sequence const&, + typename enable_if< + mpl::and_< + traits::is_sequence + , result_of::empty>>::type* /*dummy*/ = 0) + {} + + deque() {} }; template @@ -60,7 +77,7 @@ namespace boost { namespace fusion typedef typename detail::deque_keyed_values::type base; typedef mpl::int_<(sizeof ...(Tail) + 1)> size; typedef mpl::int_ next_up; - typedef mpl::int_::type::value> next_down; + typedef mpl::int_<((size::value == 0) ? 0 : -1)> next_down; typedef mpl::false_ is_view; deque() diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index 19ca8f8f..fc1f9cbd 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -16,10 +16,10 @@ #if (defined(BOOST_NO_DECLTYPE) \ || defined(BOOST_NO_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_RVALUE_REFERENCES)) -# include +# include #else -# if !defined(BOOST_FUSION_HAS_CPP11_DEQUE) -# define BOOST_FUSION_HAS_CPP11_DEQUE +# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# define BOOST_FUSION_HAS_VARIADIC_DEQUE # endif /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index 09d10223..44d279f6 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -9,7 +9,7 @@ #if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212) #define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif diff --git a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp index edb3c176..21075ef4 100644 --- a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/deque_initial_size.hpp @@ -8,7 +8,7 @@ #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139) #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp index eea7e8c3..d457516f 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -9,7 +9,7 @@ #if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211) #define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp b/include/boost/fusion/container/deque/detail/pp_deque.hpp similarity index 96% rename from include/boost/fusion/container/deque/detail/cpp03_deque.hpp rename to include/boost/fusion/container/deque/detail/pp_deque.hpp index dcc1e3c3..7913b67b 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque.hpp @@ -5,17 +5,17 @@ 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(BOOST_CPP03_FUSION_DEQUE_26112006_1649) -#define BOOST_CPP03_FUSION_DEQUE_26112006_1649 +#if !defined(BOOST_PP_FUSION_DEQUE_26112006_1649) +#define BOOST_PP_FUSION_DEQUE_26112006_1649 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp b/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp similarity index 92% rename from include/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp index 3a74447b..354cfccd 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp @@ -5,10 +5,10 @@ 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(FUSION_CPP03_DEQUE_FORWARD_02092007_0749) -#define FUSION_CPP03_DEQUE_FORWARD_02092007_0749 +#if !defined(FUSION_PP_DEQUE_FORWARD_02092007_0749) +#define FUSION_PP_DEQUE_FORWARD_02092007_0749 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif diff --git a/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp similarity index 98% rename from include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp index d32c13a5..a7c4939a 100644 --- a/include/boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp @@ -8,7 +8,7 @@ #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330) #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif diff --git a/include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp diff --git a/include/boost/fusion/container/deque/limits.hpp b/include/boost/fusion/container/deque/limits.hpp index 2a7d219d..7892ba1a 100644 --- a/include/boost/fusion/container/deque/limits.hpp +++ b/include/boost/fusion/container/deque/limits.hpp @@ -8,7 +8,7 @@ #if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737) #define BOOST_FUSION_DEQUE_LIMITS_26112006_1737 -#if defined(BOOST_FUSION_HAS_CPP11_DEQUE) +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) #error "C++03 only! This file should not have been included" #endif From 78ff3d883114d0422db0f782188be1ff250bf63d Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 4 Sep 2012 13:40:38 +0000 Subject: [PATCH 63/99] Fixed code to allow decltype implementation of boost::result_of with BOOST_RESULT_OF_USE_DECLTYPE defined. [SVN r80395] --- .../fusion/functional/invocation/invoke.hpp | 81 +++++++++++++++++-- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/include/boost/fusion/functional/invocation/invoke.hpp b/include/boost/fusion/functional/invocation/invoke.hpp index 085beb7e..1a491702 100644 --- a/include/boost/fusion/functional/invocation/invoke.hpp +++ b/include/boost/fusion/functional/invocation/invoke.hpp @@ -57,13 +57,13 @@ namespace boost { namespace fusion template struct invoke; } - template - inline typename result_of::invoke::type - invoke(Function, Sequence &); + //~ template + //~ inline typename result_of::invoke::type + //~ invoke(Function, Sequence &); - template - inline typename result_of::invoke::type - invoke(Function, Sequence const &); + //~ template + //~ inline typename result_of::invoke::type + //~ invoke(Function, Sequence const &); //----- ---- --- -- - - - - @@ -85,6 +85,9 @@ namespace boost { namespace fusion template struct invoke_data_member; + template + struct invoke_fn_ptr; + template struct invoke_mem_fn; @@ -95,10 +98,10 @@ namespace boost { namespace fusion template struct invoke_nonmember_builtin // use same implementation as for function objects but... - : invoke_impl< // ...work around boost::result_of bugs + : invoke_fn_ptr< // ...work around boost::result_of bugs typename mpl::eval_if< ft::is_function, boost::add_reference, boost::remove_cv >::type, - Sequence, N, false, RandomAccess > + Sequence, N, RandomAccess > { }; template @@ -199,6 +202,35 @@ namespace boost { namespace fusion Function(BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { +#define M(z,j,data) fusion::at_c(s) + return f( BOOST_PP_ENUM(N,M,~) ); + } + +#else + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + + }; + + template + struct invoke_fn_ptr + { + public: + + typedef typename ft::result_type::type result_type; + #if N > 0 template @@ -278,6 +310,39 @@ namespace boost { namespace fusion return f(); } +#endif + + }; + + template + struct invoke_fn_ptr + { + private: + typedef invoke_param_types seq; + public: + + typedef typename ft::result_type::type result_type; + +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { + typename seq::I0 i0 = fusion::begin(s); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) + return f( BOOST_PP_ENUM_PARAMS(N,*i) ); + } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + #endif }; From a856857cb78ed53a430dfae8b0670e395c7a6a10 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 4 Sep 2012 13:42:14 +0000 Subject: [PATCH 64/99] - Fixed code to allow decltype implementation of boost::result_of with BOOST_RESULT_OF_USE_DECLTYPE defined. - Reverted sequence/iterator.hpp to original version. [SVN r80396] --- test/Jamfile | 1 + test/sequence/iterator.hpp | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index b372d6b2..c7beba84 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -12,6 +12,7 @@ project : requirements gcc:-std=c++0x darwin:-std=c++0x + gcc:-DBOOST_RESULT_OF_USE_DECLTYPE ; { diff --git a/test/sequence/iterator.hpp b/test/sequence/iterator.hpp index c5364cb8..ab29b8a0 100644 --- a/test/sequence/iterator.hpp +++ b/test/sequence/iterator.hpp @@ -29,11 +29,7 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE seq_type; -#if !defined(BOOST_NO_RVALUE_REFERENCES) - seq_type v(1, 'x', 3.3, std::move(s)); -#else seq_type v(1, 'x', 3.3, s); -#endif boost::fusion::result_of::begin::type i(v); BOOST_TEST(*i == 1); @@ -65,12 +61,7 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE const seq_type; -#if !defined(BOOST_NO_RVALUE_REFERENCES) - seq_type t(1, 'x', 3.3, std::move(s)); -#else seq_type t(1, 'x', 3.3, s); -#endif - boost::fusion::result_of::begin::type i(t); BOOST_TEST(*i == 1); @@ -113,11 +104,7 @@ void test() char const* s = "Hello"; typedef FUSION_SEQUENCE seq_type; -#if !defined(BOOST_NO_RVALUE_REFERENCES) - seq_type t(1, 'x', 3.3, std::move(s)); -#else seq_type t(1, 'x', 3.3, s); -#endif boost::fusion::result_of::begin::type i(t); BOOST_TEST(*i == 1); From b57cd4ede9e3a87509faedf549b18fe98c1c6204 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 9 Sep 2012 00:27:37 +0000 Subject: [PATCH 65/99] - patch from nathan ridge - fixed deque regression [SVN r80458] --- .../adapted/struct/detail/define_struct_inline.hpp | 13 +++++++++---- .../fusion/container/deque/detail/keyed_element.hpp | 4 +++- .../deque/detail/variadic_deque_keyed_values.hpp | 9 +++++---- 3 files changed, 17 insertions(+), 9 deletions(-) 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 6e3630a3..7bc5fe08 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -203,7 +203,7 @@ BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ NAME, \ ATTRIBUTES_SEQ, \ - BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)) + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ))) #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ @@ -304,17 +304,22 @@ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ \ + /* Note: second BOOST_PP_IF is necessary to avoid MSVC warning when */ \ + /* calling BOOST_FUSION_IGNORE_1 with no arguments. */ \ NAME() \ BOOST_PP_IF( \ - BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ + ATTRIBUTES_SEQ_SIZE, \ BOOST_FUSION_MAKE_DEFAULT_INIT_LIST, \ BOOST_FUSION_IGNORE_1) \ - (ATTRIBUTES_SEQ) \ + (BOOST_PP_IF( \ + ATTRIBUTES_SEQ_SIZE, \ + ATTRIBUTES_SEQ, \ + 0)) \ { \ } \ \ BOOST_PP_IF( \ - BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ + ATTRIBUTES_SEQ_SIZE, \ BOOST_FUSION_MAKE_COPY_CONSTRUCTOR, \ BOOST_FUSION_IGNORE_2) \ (NAME, ATTRIBUTES_SEQ) \ diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index 4dc60500..e5bdc2ab 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -93,7 +93,9 @@ namespace boost { namespace fusion { namespace detail return value_; } - keyed_element(Value const& value, Rest const& rest) + keyed_element( + typename detail::call_param::type value + , Rest const& rest) : Rest(rest), value_(value) {} diff --git a/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp index dd57b3a4..aae26a5b 100644 --- a/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp @@ -38,12 +38,13 @@ namespace boost { namespace fusion { namespace detail ); } - static type forward_(Head&& head, Tail&&... tail) + template + static type forward_(Head_&& head, Tail_&&... tail) { return type( - std::forward(head) - , deque_keyed_values_impl:: - forward_(std::forward(tail)...) + std::forward(head) + , deque_keyed_values_impl:: + forward_(std::forward(tail)...) ); } }; From 752f911a913ad16b18e66af78ffad0b8e3c02415 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 2 Oct 2012 01:12:19 +0000 Subject: [PATCH 66/99] #7427 (Warning fixes in fusion) [SVN r80812] --- .../fusion/algorithm/iteration/detail/preprocessed/fold.hpp | 2 +- .../algorithm/iteration/detail/preprocessed/reverse_fold.hpp | 2 +- include/boost/fusion/algorithm/query/detail/any.hpp | 2 +- include/boost/fusion/iterator/iterator_adapter.hpp | 4 ++-- include/boost/fusion/sequence/intrinsic/has_key.hpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp index d368338a..c89a7dda 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp @@ -116,7 +116,7 @@ namespace boost { namespace fusion { template static Result - call(State const& state,It0 const& it0, F) + call(State const& state,It0 const&, F) { return static_cast(state); } 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 71730abf..48a41344 100644 --- a/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp @@ -115,7 +115,7 @@ namespace boost { namespace fusion { template static Result - call(State const& state,It0 const& it0, F) + call(State const& state,It0 const&, F) { return static_cast(state); } diff --git a/include/boost/fusion/algorithm/query/detail/any.hpp b/include/boost/fusion/algorithm/query/detail/any.hpp index 42409d5a..5f6b8577 100644 --- a/include/boost/fusion/algorithm/query/detail/any.hpp +++ b/include/boost/fusion/algorithm/query/detail/any.hpp @@ -109,7 +109,7 @@ namespace detail struct unrolled_any<0> { template - static bool call(It const& it, F f) + static bool call(It const&, F) { return false; } diff --git a/include/boost/fusion/iterator/iterator_adapter.hpp b/include/boost/fusion/iterator/iterator_adapter.hpp index 68056269..9077f8fa 100644 --- a/include/boost/fusion/iterator/iterator_adapter.hpp +++ b/include/boost/fusion/iterator/iterator_adapter.hpp @@ -23,8 +23,8 @@ namespace boost { namespace fusion iterator_base_type; iterator_base_type iterator_base; - iterator_adapter(iterator_base_type const& iterator_base) - : iterator_base(iterator_base) {} + iterator_adapter(iterator_base_type const& iterator_base_) + : iterator_base(iterator_base_) {} // default implementation template diff --git a/include/boost/fusion/sequence/intrinsic/has_key.hpp b/include/boost/fusion/sequence/intrinsic/has_key.hpp index 1ff05bad..9e0969a9 100644 --- a/include/boost/fusion/sequence/intrinsic/has_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/has_key.hpp @@ -68,7 +68,7 @@ namespace boost { namespace fusion template inline typename result_of::has_key::type - has_key(Sequence const& seq) + has_key(Sequence const&) { typedef typename result_of::has_key::type result; return result(); From f760ed7b8fd786fc451295465be16045ad41d0a8 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 5 Oct 2012 06:15:02 +0000 Subject: [PATCH 67/99] removing c++11 requirements in jamfile (mistakenly added) [SVN r80865] --- test/Jamfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index c7beba84..f23b0c2a 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -10,9 +10,6 @@ import testing ; project : requirements - gcc:-std=c++0x - darwin:-std=c++0x - gcc:-DBOOST_RESULT_OF_USE_DECLTYPE ; { From d01148d339a9c5e08c0ea9a6d797d2fae4e1c567 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 3 Nov 2012 23:44:36 +0000 Subject: [PATCH 68/99] Fixed typo [SVN r81164] --- doc/iterator.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/iterator.qbk b/doc/iterator.qbk index 8efecda9..666bc7ac 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -494,7 +494,7 @@ Deferences the data property associated with the element referenced by an associ template< typename I > - typename __result_of_deref_data__::type deref(I const& i); + typename __result_of_deref_data__::type deref_data(I const& i); [table Parameters [[Parameter] [Requirement] [Description]] From cfbbba272e551e6e32d96b5e8db505c21d7c28b6 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 4 Nov 2012 00:18:41 +0000 Subject: [PATCH 69/99] Fixes for Ticket #7569 ( Compile Error using BOOST_FUSION_DEFINE_STRUCT_INLINE with VC10 and GCC <4.5 ) [SVN r81165] --- .../struct/detail/define_struct_inline.hpp | 133 ++++++++++++++++-- test/sequence/define_struct_inline.cpp | 45 ++++-- test/sequence/define_tpl_struct_inline.cpp | 44 ++++-- 3 files changed, 183 insertions(+), 39 deletions(-) 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 7bc5fe08..c06b61b5 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -8,6 +8,7 @@ #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP +#include #include #include #include @@ -25,8 +26,32 @@ #include #include #include +#include #include +// MSVC and GCC <= 4.4 have a bug that affects partial specializations of +// nested templates under some circumstances. This affects the implementation +// of BOOST_FUSION_DEFINE_STRUCT_INLINE, which uses such specializations for +// the iterator class's 'deref' and 'value_of' metafunctions. On these compilers +// an alternate implementation for these metafunctions is used that does not +// require such specializations. The alternate implementation takes longer +// to compile so its use is restricted to the offending compilers. +// For MSVC, the bug was was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates +// For GCC, 4.4 and earlier are no longer maintained so there is no need +// to report a bug. +#if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4))) + #define BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND +#endif + +#ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND +#include +#include +#include +#include +#include +#endif + + #define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \ BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)() @@ -148,6 +173,95 @@ #define BOOST_FUSION_MAKE_DATA_MEMBER(R, DATA, N, ATTRIBUTE) \ BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); +#ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND + +#define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTE_SEQ_SIZE) \ + template \ + struct value_of : boost::fusion::result_of::at_c< \ + ref_vec_t, \ + boost_fusion_detail_Iterator::index::value \ + > \ + { \ + }; + +#define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \ + template \ + struct deref \ + { \ + typedef typename boost::remove_const< \ + boost_fusion_detail_Iterator \ + >::type iterator_raw_type; \ + \ + static const int index = iterator_raw_type::index::value; \ + \ + typedef typename boost::fusion::result_of::at_c< \ + ref_vec_t, \ + index \ + >::type result_raw_type; \ + \ + typedef typename boost::mpl::if_< \ + boost::is_const, \ + typename boost::add_const::type, \ + result_raw_type \ + >::type type; \ + \ + static type call(iterator_raw_type const& iter) \ + { \ + return boost::fusion::at_c(iter.ref_vec); \ + } \ + }; + +#define BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME(R, DATA, N, ATTRIBUTE) \ + BOOST_PP_COMMA_IF(N) seq.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE) + +#define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ) \ + , ref_vec(BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME, \ + ~, \ + BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ))) + +#define BOOST_FUSION_MAKE_ITERATOR_WKND_REF(Z, N, DATA) \ + BOOST_PP_COMMA_IF(N) \ + typename boost::mpl::if_< \ + boost::is_const, \ + typename boost::add_const< \ + typename boost_fusion_detail_Seq::t##N##_type \ + >::type, \ + typename boost_fusion_detail_Seq::t##N##_type \ + >::type& + +#define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE) \ + typedef boost::fusion::vector< \ + BOOST_PP_REPEAT( \ + ATTRIBUTES_SEQ_SIZE, \ + BOOST_FUSION_MAKE_ITERATOR_WKND_REF, \ + ~) \ + > ref_vec_t; \ + \ + ref_vec_t ref_vec; + +#else + +#define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE) \ + template struct value_of; \ + BOOST_PP_REPEAT( \ + ATTRIBUTES_SEQ_SIZE, \ + BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \ + NAME) + +#define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \ + template struct deref; \ + BOOST_PP_SEQ_FOR_EACH_I( \ + BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \ + NAME, \ + ATTRIBUTES_SEQ) + +#define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ) + +#define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE) + +#endif // BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND + // Note: We can't nest the iterator inside the struct because we run into // a MSVC10 bug involving partial specializations of nested templates. @@ -219,21 +333,18 @@ typedef boost_fusion_detail_Seq sequence_type; \ \ BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \ - : seq_(seq) {} \ + : seq_(seq) \ + BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \ + (0)ATTRIBUTES_SEQ) \ + {} \ \ boost_fusion_detail_Seq& seq_; \ \ - template struct value_of; \ - BOOST_PP_REPEAT( \ - ATTRIBUTES_SEQ_SIZE, \ - BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \ - NAME) \ + BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE) \ \ - template struct deref; \ - BOOST_PP_SEQ_FOR_EACH_I( \ - BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \ - NAME, \ - ATTRIBUTES_SEQ) \ + BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE) \ + \ + BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \ \ template \ struct next \ diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp index 9e3f6277..9cbd8ea0 100644 --- a/test/sequence/define_struct_inline.cpp +++ b/test/sequence/define_struct_inline.cpp @@ -26,6 +26,16 @@ struct cls ) }; +template +struct tpl_cls +{ + BOOST_FUSION_DEFINE_STRUCT_INLINE( + point, + (int, x) + (int, y) + ) +}; + namespace ns { BOOST_FUSION_DEFINE_STRUCT_INLINE(s, (int, m)) @@ -33,8 +43,8 @@ namespace ns BOOST_FUSION_DEFINE_STRUCT_INLINE(empty_struct, ) } -int -main() +template +void run_test() { using namespace boost::fusion; @@ -48,8 +58,8 @@ main() } { - BOOST_MPL_ASSERT_NOT((traits::is_view)); - cls::point p(123, 456); + BOOST_MPL_ASSERT_NOT((traits::is_view)); + Point p(123, 456); std::cout << at_c<0>(p) << std::endl; std::cout << at_c<1>(p) << std::endl; @@ -60,8 +70,8 @@ main() at_c<1>(p) = 9; BOOST_TEST(p == make_vector(6, 9)); - BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); - BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); BOOST_TEST(front(p) == 6); BOOST_TEST(back(p) == 9); @@ -69,7 +79,7 @@ main() { vector v1(4, 2); - cls::point v2(5, 3); + Point v2(5, 3); vector v3(5, 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); @@ -82,15 +92,15 @@ main() } { - // conversion from cls::point to vector - cls::point p(5, 3); + // conversion from Point to vector + Point p(5, 3); vector v(p); v = p; } { - // conversion from cls::point to list - cls::point p(5, 3); + // conversion from Point to list + Point p(5, 3); list l(p); l = p; } @@ -105,13 +115,20 @@ main() } { - cls::point p = make_list(5,3); + Point p = make_list(5,3); BOOST_TEST(p == make_vector(5,3)); p = make_list(3,5); BOOST_TEST(p == make_vector(3,5)); } - - return boost::report_errors(); +} + +int +main() +{ + run_test(); // test with non-template enclosing class + run_test::point>(); // test with template enclosing class + return boost::report_errors(); + } diff --git a/test/sequence/define_tpl_struct_inline.cpp b/test/sequence/define_tpl_struct_inline.cpp index 1052f5db..fad064f7 100644 --- a/test/sequence/define_tpl_struct_inline.cpp +++ b/test/sequence/define_tpl_struct_inline.cpp @@ -27,6 +27,17 @@ struct cls ) }; +template +struct tpl_cls +{ + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( + (X)(Y), + point, + (X, x) + (Y, y) + ) +}; + namespace ns { BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE((M), s, (M, m)) @@ -34,13 +45,11 @@ namespace ns BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE((M), empty_struct, ) } -int -main() +template +void run_test() { using namespace boost::fusion; - typedef cls::point point; - std::cout << tuple_open('['); std::cout << tuple_close(']'); std::cout << tuple_delimiter(", "); @@ -51,8 +60,8 @@ main() } { - BOOST_MPL_ASSERT_NOT((traits::is_view)); - point p(123, 456); + BOOST_MPL_ASSERT_NOT((traits::is_view)); + Point p(123, 456); std::cout << at_c<0>(p) << std::endl; std::cout << at_c<1>(p) << std::endl; @@ -63,8 +72,8 @@ main() at_c<1>(p) = 9; BOOST_TEST(p == make_vector(6, 9)); - BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); - BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); BOOST_TEST(front(p) == 6); BOOST_TEST(back(p) == 9); @@ -72,7 +81,7 @@ main() { vector v1(4, 2); - point v2(5, 3); + Point v2(5, 3); vector v3(5, 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); @@ -85,15 +94,15 @@ main() } { - // conversion from point to vector - point p(5, 3); + // conversion from Point to vector + Point p(5, 3); vector v(p); v = p; } { - // conversion from point to list - point p(5, 3); + // conversion from Point to list + Point p(5, 3); list l(p); l = p; } @@ -109,13 +118,20 @@ main() { - point p = make_list(5,3); + Point p = make_list(5,3); BOOST_TEST(p == make_vector(5,3)); p = make_list(3,5); BOOST_TEST(p == make_vector(3,5)); } +} +int +main() +{ + run_test >(); // test non-template enclosing class + run_test::point >(); // test template enclosing class + return boost::report_errors(); } From e1819c11b2fd102c264ae4ac07c174eeed0f9b4c Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 21 Nov 2012 03:12:31 +0000 Subject: [PATCH 70/99] Remove usage of deprecated macros [SVN r81452] --- include/boost/fusion/adapted.hpp | 2 +- .../fusion/container/deque/back_extended_deque.hpp | 2 +- include/boost/fusion/container/deque/deque.hpp | 10 +++++----- include/boost/fusion/container/deque/deque_fwd.hpp | 6 +++--- .../container/deque/detail/deque_forward_ctor.hpp | 2 +- .../fusion/container/deque/detail/keyed_element.hpp | 10 +++++----- .../boost/fusion/container/deque/detail/pp_deque.hpp | 6 +++--- .../fusion/container/deque/front_extended_deque.hpp | 2 +- .../container/vector/detail/vector_forward_ctor.hpp | 2 +- .../boost/fusion/container/vector/detail/vector_n.hpp | 10 +++++----- include/boost/fusion/container/vector/vector.hpp | 4 ++-- include/boost/fusion/functional/adapter/unfused.hpp | 2 +- .../boost/fusion/functional/adapter/unfused_typed.hpp | 2 +- include/boost/fusion/support/deduce_sequence.hpp | 2 +- .../boost/fusion/view/detail/strictest_traversal.hpp | 2 +- include/boost/fusion/view/nview/nview.hpp | 2 +- .../fusion/view/zip_view/detail/value_at_impl.hpp | 2 +- .../fusion/view/zip_view/detail/value_of_impl.hpp | 2 +- include/boost/fusion/view/zip_view/zip_view.hpp | 4 ++-- 19 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/boost/fusion/adapted.hpp b/include/boost/fusion/adapted.hpp index bcff7161..6c9589d5 100644 --- a/include/boost/fusion/adapted.hpp +++ b/include/boost/fusion/adapted.hpp @@ -18,7 +18,7 @@ // The std_tuple_iterator adaptor only supports implementations // using variadic templates -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #endif diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index 738e05bb..81728231 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -31,7 +31,7 @@ namespace boost { namespace fusion : base(val, deque) {} -#if defined(BOOST_NO_RVALUE_REFERENCES) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template back_extended_deque(Deque const& deque, Arg& val) : base(val, deque) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 56ae290e..b510b911 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -13,7 +13,7 @@ /////////////////////////////////////////////////////////////////////////////// // With variadics, we will use the PP version version /////////////////////////////////////////////////////////////////////////////// -#if defined(BOOST_NO_VARIADIC_TEMPLATES) +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) # include #else # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) @@ -93,7 +93,7 @@ namespace boost { namespace fusion : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque(deque&& seq) : base(std::forward>(seq)) @@ -104,7 +104,7 @@ namespace boost { namespace fusion : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(deque&& seq) : base(std::forward(seq)) {} @@ -119,7 +119,7 @@ namespace boost { namespace fusion : base(detail::deque_keyed_values::construct(head, tail...)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template explicit deque(Head_&& head, Tail_&&... tail) : base(detail::deque_keyed_values @@ -147,7 +147,7 @@ namespace boost { namespace fusion return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque& operator=(T&& rhs) { diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index fc1f9cbd..0c8f4ea8 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -13,9 +13,9 @@ /////////////////////////////////////////////////////////////////////////////// // With no decltype and variadics, we will use the C++03 version /////////////////////////////////////////////////////////////////////////////// -#if (defined(BOOST_NO_DECLTYPE) \ - || defined(BOOST_NO_VARIADIC_TEMPLATES) \ - || defined(BOOST_NO_RVALUE_REFERENCES)) +#if (defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) # include #else # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index 44d279f6..30db3263 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -34,7 +34,7 @@ deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::construct(BOOST_PP_ENUM_PARAMS(N, t))) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) : base(detail::deque_keyed_values:: forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index e5bdc2ab..f468020b 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -51,7 +51,7 @@ namespace boost { namespace fusion { namespace detail : Rest(rhs.get_base()), value_(rhs.value_) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) keyed_element(keyed_element&& rhs) : Rest(std::forward(rhs.forward_base())) , value_(std::forward(rhs.value_)) @@ -63,7 +63,7 @@ namespace boost { namespace fusion { namespace detail : Rest(rhs.get_base()), value_(rhs.value_) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #endif Rest& get_base() @@ -76,7 +76,7 @@ namespace boost { namespace fusion { namespace detail return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) Rest&& forward_base() { return std::forward(*static_cast(this)); @@ -99,7 +99,7 @@ namespace boost { namespace fusion { namespace detail : Rest(rest), value_(value) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) keyed_element(Value&& value, Rest&& rest) : Rest(std::forward(rest)) , value_(std::forward(value)) @@ -125,7 +125,7 @@ namespace boost { namespace fusion { namespace detail return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) keyed_element& operator=(keyed_element&& rhs) { base::operator=(std::forward(rhs)); diff --git a/include/boost/fusion/container/deque/detail/pp_deque.hpp b/include/boost/fusion/container/deque/detail/pp_deque.hpp index 7913b67b..6d3b4987 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque.hpp @@ -91,7 +91,7 @@ namespace boost { namespace fusion { : base(rhs) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) explicit deque(T0&& t0) : base(std::forward(t0), detail::nil_keyed_element()) {} @@ -106,7 +106,7 @@ namespace boost { namespace fusion { : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque(deque&& seq) : base(std::forward>(seq)) @@ -134,7 +134,7 @@ namespace boost { namespace fusion { return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque& operator=(T&& rhs) diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 2f3654ed..3b8501a9 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion : base(val, deque) {} -#if defined(BOOST_NO_RVALUE_REFERENCES) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template front_extended_deque(Deque const& deque, Arg& val) : base(val, deque) diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp index 8d8865f1..512d7bde 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -37,7 +37,7 @@ N, typename detail::call_param::type _)) : vec(BOOST_PP_ENUM_PARAMS(N, _)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if N == 1 explicit #endif diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 539b47fa..e3d5e13f 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -49,7 +49,7 @@ BOOST_PP_CAT(vector_data, N)() : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT, _) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {} #endif @@ -63,7 +63,7 @@ BOOST_PP_CAT(vector_data, N) const& other) : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_COPY_INIT, _) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N)&& other) : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FWD, _) {} @@ -123,7 +123,7 @@ N, typename detail::call_param::type _)) : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if (N == 1) explicit #endif @@ -131,7 +131,7 @@ : base_type(BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FORWARD, _)) {} #endif -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs) : base_type(std::forward(rhs)) {} #endif @@ -178,7 +178,7 @@ return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N)&& vec) { diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 36c1b7ac..9d5d8725 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -106,7 +106,7 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) vector(vector&& rhs) : vec(std::forward(rhs.vec)) {} #endif @@ -140,7 +140,7 @@ namespace boost { namespace fusion return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) vector& operator=(vector&& rhs) { diff --git a/include/boost/fusion/functional/adapter/unfused.hpp b/include/boost/fusion/functional/adapter/unfused.hpp index facd5c54..9101afee 100644 --- a/include/boost/fusion/functional/adapter/unfused.hpp +++ b/include/boost/fusion/functional/adapter/unfused.hpp @@ -100,7 +100,7 @@ namespace boost { namespace fusion namespace boost { -#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE) template struct result_of< boost::fusion::unfused const () > { diff --git a/include/boost/fusion/functional/adapter/unfused_typed.hpp b/include/boost/fusion/functional/adapter/unfused_typed.hpp index 923c6876..060c812e 100644 --- a/include/boost/fusion/functional/adapter/unfused_typed.hpp +++ b/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -80,7 +80,7 @@ namespace boost { namespace fusion namespace boost { -#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE) template struct result_of< boost::fusion::unfused_typed const () > : boost::fusion::unfused_typed::template result< diff --git a/include/boost/fusion/support/deduce_sequence.hpp b/include/boost/fusion/support/deduce_sequence.hpp index ce02a3cd..a1b690fc 100644 --- a/include/boost/fusion/support/deduce_sequence.hpp +++ b/include/boost/fusion/support/deduce_sequence.hpp @@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace traits { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result< deducer(T) >::type operator()(T&&) const; diff --git a/include/boost/fusion/view/detail/strictest_traversal.hpp b/include/boost/fusion/view/detail/strictest_traversal.hpp index 7b7c9760..1561a5bd 100644 --- a/include/boost/fusion/view/detail/strictest_traversal.hpp +++ b/include/boost/fusion/view/detail/strictest_traversal.hpp @@ -56,7 +56,7 @@ namespace boost { namespace fusion }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(StrictestSoFar&&, Next&&) const; diff --git a/include/boost/fusion/view/nview/nview.hpp b/include/boost/fusion/view/nview/nview.hpp index 2355b688..401c4016 100644 --- a/include/boost/fusion/view/nview/nview.hpp +++ b/include/boost/fusion/view/nview/nview.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion template struct result : add_reference {}; -#ifdef BOOST_NO_RVALUE_REFERENCES +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template typename add_reference::type operator()(T& x) const diff --git a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp index 13e0274f..513d781f 100644 --- a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp @@ -38,7 +38,7 @@ namespace boost { namespace fusion { {}; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Seq&&) const; diff --git a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp index 5571155e..2890a4e3 100644 --- a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion {}; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(It&&) const; diff --git a/include/boost/fusion/view/zip_view/zip_view.hpp b/include/boost/fusion/view/zip_view/zip_view.hpp index e9a0222d..b44739bb 100644 --- a/include/boost/fusion/view/zip_view/zip_view.hpp +++ b/include/boost/fusion/view/zip_view/zip_view.hpp @@ -68,7 +68,7 @@ namespace boost { namespace fusion { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Seq&&) const; @@ -89,7 +89,7 @@ namespace boost { namespace fusion { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Lhs&&, Rhs&&) const; From 8d6200ef58e8278c66884b4cc26452c89f741fce Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 26 Nov 2012 18:44:46 +0000 Subject: [PATCH 71/99] Removed usage of deprecated macros in Boost.Fusion and Boost.Spirit [SVN r81569] --- test/algorithm/pop_back.cpp | 2 +- test/sequence/deque_move.cpp | 4 ++-- test/sequence/move.hpp | 2 +- test/sequence/std_tuple_iterator.cpp | 2 +- test/sequence/vector_move.cpp | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/algorithm/pop_back.cpp b/test/algorithm/pop_back.cpp index a96106d1..e374152f 100644 --- a/test/algorithm/pop_back.cpp +++ b/test/algorithm/pop_back.cpp @@ -75,7 +75,7 @@ main() //~ std::cout << pop_back(l) << std::endl; //~ } -#ifndef BOOST_NO_AUTO_DECLARATIONS +#ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS { auto vec = make_vector(1, 3.14, "hello"); diff --git a/test/sequence/deque_move.cpp b/test/sequence/deque_move.cpp index 42fda2d9..d096f3b1 100644 --- a/test/sequence/deque_move.cpp +++ b/test/sequence/deque_move.cpp @@ -9,7 +9,7 @@ #include -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #include @@ -23,7 +23,7 @@ int main() { -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) test(); #endif diff --git a/test/sequence/move.hpp b/test/sequence/move.hpp index b96a60e7..1ffeceee 100644 --- a/test/sequence/move.hpp +++ b/test/sequence/move.hpp @@ -6,7 +6,7 @@ ==============================================================================*/ #include -#if defined(BOOST_NO_RVALUE_REFERENCES) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #error "Valid only on compilers that support rvalues" #endif diff --git a/test/sequence/std_tuple_iterator.cpp b/test/sequence/std_tuple_iterator.cpp index 1592eef5..202fb7a5 100644 --- a/test/sequence/std_tuple_iterator.cpp +++ b/test/sequence/std_tuple_iterator.cpp @@ -8,7 +8,7 @@ // The std_tuple_iterator adaptor only supports implementations // using variadic templates -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include diff --git a/test/sequence/vector_move.cpp b/test/sequence/vector_move.cpp index 70483f06..23a82851 100644 --- a/test/sequence/vector_move.cpp +++ b/test/sequence/vector_move.cpp @@ -8,7 +8,7 @@ #include -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #include @@ -22,7 +22,7 @@ int main() { -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) test(); #endif From 6d265316edb894756d5518b69eca9e702af78c55 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 30 Nov 2012 02:31:23 +0000 Subject: [PATCH 72/99] Workaround for ObjC (mis)use of nil (from Mathias Gaunard) [SVN r81628] --- .../fusion/container/generation/cons_tie.hpp | 4 ++-- .../fusion/container/generation/make_cons.hpp | 4 ++-- include/boost/fusion/container/list/cons.hpp | 8 +++---- .../boost/fusion/container/list/cons_fwd.hpp | 9 +++++--- .../fusion/container/list/cons_iterator.hpp | 22 +++++++++---------- .../container/list/detail/begin_impl.hpp | 2 +- .../container/list/detail/build_cons.hpp | 6 ++--- .../container/list/detail/empty_impl.hpp | 4 ++-- .../fusion/container/list/detail/end_impl.hpp | 4 ++-- .../container/list/detail/list_to_cons.hpp | 4 ++-- .../list/detail/preprocessed/list10.hpp | 2 +- .../list/detail/preprocessed/list20.hpp | 2 +- .../list/detail/preprocessed/list30.hpp | 2 +- .../list/detail/preprocessed/list40.hpp | 2 +- .../list/detail/preprocessed/list50.hpp | 2 +- .../detail/preprocessed/list_to_cons10.hpp | 2 +- .../detail/preprocessed/list_to_cons20.hpp | 2 +- .../detail/preprocessed/list_to_cons30.hpp | 2 +- .../detail/preprocessed/list_to_cons40.hpp | 2 +- .../detail/preprocessed/list_to_cons50.hpp | 2 +- .../container/list/detail/reverse_cons.hpp | 6 ++--- include/boost/fusion/container/list/list.hpp | 2 +- .../iterator/detail/segmented_equal_to.hpp | 4 ++-- .../iterator/detail/segmented_iterator.hpp | 2 +- .../iterator/detail/segmented_next_impl.hpp | 2 +- .../intrinsic/detail/segmented_begin.hpp | 4 ++-- .../intrinsic/detail/segmented_end.hpp | 2 +- .../fusion/support/segmented_fold_until.hpp | 8 +++---- .../detail/segmented_iterator_range.hpp | 8 +++---- 29 files changed, 64 insertions(+), 61 deletions(-) diff --git a/include/boost/fusion/container/generation/cons_tie.hpp b/include/boost/fusion/container/generation/cons_tie.hpp index 4459e0c3..e42b4202 100644 --- a/include/boost/fusion/container/generation/cons_tie.hpp +++ b/include/boost/fusion/container/generation/cons_tie.hpp @@ -11,11 +11,11 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace result_of { - template + template struct cons_tie { typedef cons type; diff --git a/include/boost/fusion/container/generation/make_cons.hpp b/include/boost/fusion/container/generation/make_cons.hpp index dcb606dc..b11394bf 100644 --- a/include/boost/fusion/container/generation/make_cons.hpp +++ b/include/boost/fusion/container/generation/make_cons.hpp @@ -13,11 +13,11 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace result_of { - template + template struct make_cons { typedef cons::type, Cdr> type; diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 666b5367..8a04049f 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -34,7 +34,7 @@ namespace boost { namespace fusion struct forward_traversal_tag; struct fusion_sequence_tag; - struct nil : sequence_base + struct nil_ : sequence_base { typedef mpl::int_<0> size; typedef cons_tag fusion_tag; @@ -44,10 +44,10 @@ namespace boost { namespace fusion typedef void_ car_type; typedef void_ cdr_type; - nil() {} + nil_() {} template - nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) + nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) {} template @@ -56,7 +56,7 @@ namespace boost { namespace fusion } }; - template + template struct cons : sequence_base > { typedef mpl::int_ size; diff --git a/include/boost/fusion/container/list/cons_fwd.hpp b/include/boost/fusion/container/list/cons_fwd.hpp index 80bb0443..547c42ca 100644 --- a/include/boost/fusion/container/list/cons_fwd.hpp +++ b/include/boost/fusion/container/list/cons_fwd.hpp @@ -2,7 +2,7 @@ Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2005 Eric Niebler - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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(BOOST_FUSION_CONS_FWD_HPP_INCLUDED) @@ -10,9 +10,12 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; + #ifndef nil + typedef nil_ nil; + #endif - template + template struct cons; }} diff --git a/include/boost/fusion/container/list/cons_iterator.hpp b/include/boost/fusion/container/list/cons_iterator.hpp index bc4fa094..834651d5 100644 --- a/include/boost/fusion/container/list/cons_iterator.hpp +++ b/include/boost/fusion/container/list/cons_iterator.hpp @@ -18,14 +18,14 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_iterator_tag; struct forward_traversal_tag; template struct cons_iterator_identity; - template + template struct cons_iterator : iterator_base > { typedef cons_iterator_tag fusion_tag; @@ -49,40 +49,40 @@ namespace boost { namespace fusion { typedef forward_traversal_tag category; typedef cons_iterator_tag fusion_tag; - typedef nil cons_type; + typedef nil_ cons_type; typedef cons_iterator_identity< - add_const::type> + add_const::type> identity; nil_iterator() {} - explicit nil_iterator(nil const&) {} + explicit nil_iterator(nil_ const&) {} }; template <> - struct cons_iterator : nil_iterator + struct cons_iterator : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> - struct cons_iterator : nil_iterator + struct cons_iterator : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> struct cons_iterator > : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> struct cons_iterator const> : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; }} diff --git a/include/boost/fusion/container/list/detail/begin_impl.hpp b/include/boost/fusion/container/list/detail/begin_impl.hpp index 571e6811..27a73422 100644 --- a/include/boost/fusion/container/list/detail/begin_impl.hpp +++ b/include/boost/fusion/container/list/detail/begin_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_tag; diff --git a/include/boost/fusion/container/list/detail/build_cons.hpp b/include/boost/fusion/container/list/detail/build_cons.hpp index ef486522..725b286d 100644 --- a/include/boost/fusion/container/list/detail/build_cons.hpp +++ b/include/boost/fusion/container/list/detail/build_cons.hpp @@ -24,12 +24,12 @@ namespace boost { namespace fusion { namespace detail template struct build_cons { - typedef nil type; + typedef nil_ type; - static nil + static nil_ call(First const&, Last const&) { - return nil(); + return nil_(); } }; diff --git a/include/boost/fusion/container/list/detail/empty_impl.hpp b/include/boost/fusion/container/list/detail/empty_impl.hpp index 5c92c733..2392dd7f 100644 --- a/include/boost/fusion/container/list/detail/empty_impl.hpp +++ b/include/boost/fusion/container/list/detail/empty_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { struct cons_tag; - struct nil; + struct nil_; template struct cons; @@ -28,7 +28,7 @@ namespace boost { namespace fusion { template struct apply - : boost::is_convertible + : boost::is_convertible {}; }; } diff --git a/include/boost/fusion/container/list/detail/end_impl.hpp b/include/boost/fusion/container/list/detail/end_impl.hpp index 3792250c..a2eafbaf 100644 --- a/include/boost/fusion/container/list/detail/end_impl.hpp +++ b/include/boost/fusion/container/list/detail/end_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_tag; @@ -35,7 +35,7 @@ namespace boost { namespace fusion struct apply { typedef cons_iterator< - typename mpl::if_, nil const, nil>::type> + typename mpl::if_, nil_ const, nil_>::type> type; static type diff --git a/include/boost/fusion/container/list/detail/list_to_cons.hpp b/include/boost/fusion/container/list/detail/list_to_cons.hpp index 4a7dbb83..07c11af2 100644 --- a/include/boost/fusion/container/list/detail/list_to_cons.hpp +++ b/include/boost/fusion/container/list/detail/list_to_cons.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; }} @@ -61,7 +61,7 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp b/include/boost/fusion/container/list/detail/preprocessed/list10.hpp index e233b46d..d02ba872 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list10.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp b/include/boost/fusion/container/list/detail/preprocessed/list20.hpp index 405681a1..730d1c08 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list20.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp b/include/boost/fusion/container/list/detail/preprocessed/list30.hpp index 841295ef..6e6a1433 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list30.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp b/include/boost/fusion/container/list/detail/preprocessed/list40.hpp index c486f6b8..e4f3b38f 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list40.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp b/include/boost/fusion/container/list/detail/preprocessed/list50.hpp index 21264094..fc5231f2 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list50.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp index a0f01f51..9b9377c9 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp @@ -81,6 +81,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp index b90b7a76..b142e266 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp @@ -141,6 +141,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp index 8b8a046d..814b7a4f 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp @@ -201,6 +201,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp index a435c021..69291485 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp @@ -261,6 +261,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp index 7837e9c2..1dbef681 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp @@ -321,6 +321,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/reverse_cons.hpp b/include/boost/fusion/container/list/detail/reverse_cons.hpp index 59178e84..5083e0c0 100644 --- a/include/boost/fusion/container/list/detail/reverse_cons.hpp +++ b/include/boost/fusion/container/list/detail/reverse_cons.hpp @@ -12,7 +12,7 @@ namespace boost { namespace fusion { namespace detail { //////////////////////////////////////////////////////////////////////////// - template + template struct reverse_cons; template @@ -29,11 +29,11 @@ namespace boost { namespace fusion { namespace detail }; template - struct reverse_cons + struct reverse_cons { typedef State type; - static State const &call(nil const &, State const &state = State()) + static State const &call(nil_ const &, State const &state = State()) { return state; } diff --git a/include/boost/fusion/container/list/list.hpp b/include/boost/fusion/container/list/list.hpp index 45e2f637..1d902059 100644 --- a/include/boost/fusion/container/list/list.hpp +++ b/include/boost/fusion/container/list/list.hpp @@ -32,7 +32,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template diff --git a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp index 1e4ad268..14982b86 100644 --- a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp +++ b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace detail { @@ -32,7 +32,7 @@ namespace boost { namespace fusion {}; template <> - struct segmented_equal_to + struct segmented_equal_to : mpl::true_ {}; } diff --git a/include/boost/fusion/iterator/detail/segmented_iterator.hpp b/include/boost/fusion/iterator/detail/segmented_iterator.hpp index ccd45fbf..a5cfb450 100644 --- a/include/boost/fusion/iterator/detail/segmented_iterator.hpp +++ b/include/boost/fusion/iterator/detail/segmented_iterator.hpp @@ -19,7 +19,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace detail { diff --git a/include/boost/fusion/iterator/detail/segmented_next_impl.hpp b/include/boost/fusion/iterator/detail/segmented_next_impl.hpp index 2a7f6f6c..0c5f9f51 100644 --- a/include/boost/fusion/iterator/detail/segmented_next_impl.hpp +++ b/include/boost/fusion/iterator/detail/segmented_next_impl.hpp @@ -83,7 +83,7 @@ namespace boost { namespace fusion //auto segmented_next_impl_recurse3(stack) //{ // if (size(stack) == 1) - // return cons(iterator_range(end(car(stack)), end(car(stack))), nil); + // return cons(iterator_range(end(car(stack)), end(car(stack))), nil_); // else // return segmented_next_impl_recurse(stack.cdr); //} diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp index 968718eb..7f337ce1 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp @@ -19,10 +19,10 @@ namespace boost { namespace fusion { namespace detail { //auto segmented_begin( seq ) //{ - // return make_segmented_iterator( segmented_begin_impl( seq, nil ) ); + // return make_segmented_iterator( segmented_begin_impl( seq, nil_ ) ); //} - template + template struct segmented_begin { typedef diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp index 469862ac..f62c97aa 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { namespace detail // return make_segmented_iterator( segmented_end_impl( seq ) ); //} - template + template struct segmented_end { typedef diff --git a/include/boost/fusion/support/segmented_fold_until.hpp b/include/boost/fusion/support/segmented_fold_until.hpp index 6ea58ac6..724e2a49 100644 --- a/include/boost/fusion/support/segmented_fold_until.hpp +++ b/include/boost/fusion/support/segmented_fold_until.hpp @@ -20,7 +20,7 @@ namespace boost { namespace fusion { //auto segmented_fold_until(seq, state, fun) //{ - // return first(segmented_fold_until_impl(seq, state, nil, fun)); + // return first(segmented_fold_until_impl(seq, state, nil_, fun)); //} namespace result_of @@ -32,7 +32,7 @@ namespace boost { namespace fusion detail::segmented_fold_until_impl< Sequence , State - , fusion::nil + , fusion::nil_ , Fun > filter; @@ -55,7 +55,7 @@ namespace boost { namespace fusion typename result_of::segmented_fold_until::filter filter; - return filter::call(seq, state, fusion::nil(), fun); + return filter::call(seq, state, fusion::nil_(), fun); } template @@ -66,7 +66,7 @@ namespace boost { namespace fusion typename result_of::segmented_fold_until::filter filter; - return filter::call(seq, state, fusion::nil(), fun); + return filter::call(seq, state, fusion::nil_(), fun); } }} diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index 9bf459c4..2e4e0782 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -70,7 +70,7 @@ namespace boost { namespace fusion { namespace detail // switch (size(stack_begin)) // { // case 1: - // return nil; + // return nil_; // case 2: // // car(cdr(stack_begin)) is a range over values. // assert(end(front(car(stack_begin))) == end(car(cdr(stack_begin)))); @@ -205,7 +205,7 @@ namespace boost { namespace fusion { namespace detail template struct make_segment_sequence_front { - typedef typename Stack::cdr_type type; // nil + typedef typename Stack::cdr_type type; // nil_ static type call(Stack const &stack) { @@ -218,7 +218,7 @@ namespace boost { namespace fusion { namespace detail // switch (size(stack_end)) // { // case 1: - // return nil; + // return nil_; // case 2: // // car(cdr(stack_back)) is a range over values. // assert(end(front(car(stack_end))) == end(car(cdr(stack_end)))); @@ -348,7 +348,7 @@ namespace boost { namespace fusion { namespace detail template struct make_segment_sequence_back { - typedef typename Stack::cdr_type type; // nil + typedef typename Stack::cdr_type type; // nil_ static type call(Stack const& stack) { From 211b47b47dddc0d8f92032a68693afffe5ec1ecd Mon Sep 17 00:00:00 2001 From: Michael Caisse Date: Thu, 13 Dec 2012 09:41:50 +0000 Subject: [PATCH 73/99] clarify in fusion docs that associative sequences are not checked for key uniqueness. [SVN r81891] --- doc/sequence.qbk | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/sequence.qbk b/doc/sequence.qbk index f76eee5a..633ad5ea 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -283,6 +283,7 @@ An Associative Sequence allows efficient retrieval of elements based on keys. Like associative sequences in __mpl__, and unlike associative containers in __stl__, Fusion associative sequences have no implied ordering relation. Instead, type identity is used to impose an equivalence relation on keys. +Keys are not checked for uniqueness. [variablelist Notation [[`s`] [An Associative Sequence]] From f9d6e05676544acbc9c6b89a56cfe39b89dbbfb3 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 4 Jan 2013 01:43:06 +0000 Subject: [PATCH 74/99] Applied patches for Tickets #7738, #7737 and #7646 [SVN r82348] --- doc/tuple.qbk | 4 ++-- .../fusion/adapted/struct/detail/define_struct_inline.hpp | 2 +- include/boost/fusion/container/deque/deque.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tuple.qbk b/doc/tuple.qbk index 3be81bbe..5dd6be51 100644 --- a/doc/tuple.qbk +++ b/doc/tuple.qbk @@ -91,7 +91,7 @@ Where `Vi` is `X&` if the cv-unqualified type `Ti` is `reference_wrapper`, ot template tuple tie(T1& t1, T2& t2, ..., TN& tn); -[*Returns]: tuple(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has has no effect. +[*Returns]: tuple(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has no effect. [endsect] @@ -254,7 +254,7 @@ The __tr1__tuple__ interface is specified to provide uniform access to `std::pai [*Type]: `T2` -[*Value]: Returns thetype of the second element of the pair +[*Value]: Returns the type of the second element of the pair template P& get(std::pair& pr); 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 c06b61b5..bc05e9a8 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -36,7 +36,7 @@ // an alternate implementation for these metafunctions is used that does not // require such specializations. The alternate implementation takes longer // to compile so its use is restricted to the offending compilers. -// For MSVC, the bug was was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates +// For MSVC, the bug was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates // For GCC, 4.4 and earlier are no longer maintained so there is no need // to report a bug. #if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4))) diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index b510b911..9fbd9994 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -11,7 +11,7 @@ #include /////////////////////////////////////////////////////////////////////////////// -// With variadics, we will use the PP version version +// With variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) # include From ea0cad5800d6ee1edd9c0a21db16ea02b5cd1493 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 19 Jan 2013 14:37:00 +0000 Subject: [PATCH 75/99] Added fusion::move algorithm [SVN r82550] --- .../boost/fusion/algorithm/auxiliary/move.hpp | 84 +++++++++++++++++++ include/boost/fusion/include/move.hpp | 12 +++ 2 files changed, 96 insertions(+) create mode 100644 include/boost/fusion/algorithm/auxiliary/move.hpp create mode 100644 include/boost/fusion/include/move.hpp diff --git a/include/boost/fusion/algorithm/auxiliary/move.hpp b/include/boost/fusion/algorithm/auxiliary/move.hpp new file mode 100644 index 00000000..6ed968da --- /dev/null +++ b/include/boost/fusion/algorithm/auxiliary/move.hpp @@ -0,0 +1,84 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(FUSION_MOVE_01192013_2225) +#define FUSION_MOVE_01192013_2225 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4100) // unreferenced formal parameter +#endif + +namespace boost { namespace fusion +{ + namespace detail + { + template + struct sequence_move + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static void + call(I1 const&, I2 const&, mpl::true_) + { + } + + template + static void + call(I1 const& src, I2 const& dest, mpl::false_) + { + *dest = std::move(*src); + call(fusion::next(src), fusion::next(dest)); + } + + template + static void + call(I1 const& src, I2 const& dest) + { + typename result_of::equal_to::type eq; + return call(src, dest, eq); + } + }; + } + + template + inline + typename + enable_if_c< + type_traits::ice_and< + traits::is_sequence::value + , traits::is_sequence::value + >::value, + void + >::type + move(Seq1&& src, Seq2& dest) + { + BOOST_STATIC_ASSERT( + result_of::size::value == result_of::size::value); + + detail::sequence_move< + Seq1, Seq2>:: + call(fusion::begin(src), fusion::begin(dest)); + } +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/include/boost/fusion/include/move.hpp b/include/boost/fusion/include/move.hpp new file mode 100644 index 00000000..32d0fe3b --- /dev/null +++ b/include/boost/fusion/include/move.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MOVE) +#define FUSION_INCLUDE_MOVE + +#include + +#endif From 2f61e2b707f1268f9303091307806e4e8ee289a8 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 04:24:40 +0000 Subject: [PATCH 76/99] disabling some tests with errors on c++11 [SVN r82628] --- test/functional/invoke.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/invoke.cpp b/test/functional/invoke.cpp index f326cbd8..d6d03ddf 100644 --- a/test/functional/invoke.cpp +++ b/test/functional/invoke.cpp @@ -230,7 +230,8 @@ void test_sequence_n(Sequence & seq, mpl::int_<0>) // Pointer to data member - BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data)); + // $$$ JDG $$$ disabling this test due to C++11 error: assignment of read-only location + //~ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_ctx,seq)) = that.data)); @@ -239,7 +240,8 @@ void test_sequence_n(Sequence & seq, mpl::int_<0>) BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_ctx,seq))); BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_ctx,seq))); - BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_d_ctx,seq)) = that.data)); + // $$$ JDG $$$ disabling this test due to C++11 error: assignment of read-only location + //~ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_d_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_d_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_d_ctx,seq)) = that.data)); BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_d_ctx,seq)) = that.data)); From 6a47d86d72aed89ca004427184ea4153a4af6018 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 07:13:58 +0000 Subject: [PATCH 77/99] C++ fixes [SVN r82629] --- test/sequence/deque_misc.cpp | 4 +++- test/sequence/misc.hpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/sequence/deque_misc.cpp b/test/sequence/deque_misc.cpp index c9b880ea..402afacc 100644 --- a/test/sequence/deque_misc.cpp +++ b/test/sequence/deque_misc.cpp @@ -3,13 +3,15 @@ Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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 #include +#define BOOST_FUSION_SEQUENCE_CONVERSION_IS_NOT_SEQUENCE__TYPE_PRESERVING + #define FUSION_SEQUENCE deque #include "misc.hpp" diff --git a/test/sequence/misc.hpp b/test/sequence/misc.hpp index 610b107a..ecbe1549 100644 --- a/test/sequence/misc.hpp +++ b/test/sequence/misc.hpp @@ -95,6 +95,7 @@ struct test_intrinsics2 { typedef boost::fusion::FUSION_SEQUENCE<> seq0; +#if !defined(BOOST_FUSION_SEQUENCE_CONVERSION_IS_NOT_SEQUENCE__TYPE_PRESERVING) #if !defined(FUSION_FORWARD_ONLY) // list has no back/prev typedef boost::fusion::FUSION_SEQUENCE target1; @@ -114,6 +115,8 @@ struct test_intrinsics2 typedef boost::fusion::FUSION_SEQUENCE target4; typedef boost::mpl::push_front::type seq4; BOOST_STATIC_ASSERT((boost::mpl::equal::value)); + +#endif }; void From b7d02a8c550cfe16ee3b72d8f6c3776cd826b0dc Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 07:17:01 +0000 Subject: [PATCH 78/99] + Fixes ticket #7914 + C++11 implementations for make_deque, deque_tie and as_deque [SVN r82630] --- .../boost/fusion/container/deque/convert.hpp | 94 +++++++++++++- .../container/deque/detail/convert_impl.hpp | 17 +-- .../detail/{as_deque.hpp => pp_as_deque.hpp} | 0 .../fusion/container/generation/deque_tie.hpp | 99 +++------------ .../generation/detail/pp_deque_tie.hpp | 105 ++++++++++++++++ .../generation/detail/pp_make_deque.hpp | 118 ++++++++++++++++++ .../container/generation/make_deque.hpp | 116 +++-------------- .../vector/detail/vector_forward_ctor.hpp | 3 +- .../container/vector/detail/vector_n.hpp | 36 ++++-- 9 files changed, 390 insertions(+), 198 deletions(-) rename include/boost/fusion/container/deque/detail/{as_deque.hpp => pp_as_deque.hpp} (100%) create mode 100644 include/boost/fusion/container/generation/detail/pp_deque_tie.hpp create mode 100644 include/boost/fusion/container/generation/detail/pp_make_deque.hpp diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 1910cb84..33176dc9 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2013 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -8,11 +8,100 @@ #if !defined(FUSION_CONVERT_20061213_2207) #define FUSION_CONVERT_20061213_2207 -#include #include #include + +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) + +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic implementation +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace fusion +{ + namespace detail + { + template ::value> + struct build_deque; + + template + struct build_deque + { + typedef deque<> type; + static type + call(First const&, Last const&) + { + return type(); + } + }; + + template + struct build_deque + { + typedef + build_deque::type, Last> + next_build_deque; + + typedef front_extended_deque< + typename next_build_deque::type + , typename result_of::value_of::type> + type; + + static type + call(First const& f, Last const& l) + { + typename result_of::value_of::type v = *f; + return type(next_build_deque::call(fusion::next(f), l), v); + } + }; + } + + namespace result_of + { + template + struct as_deque : + detail::build_deque< + typename result_of::begin::type + , typename result_of::end::type + > + { + }; + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence const& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); + } +}} + +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++03 (non-variadic) implementation +/////////////////////////////////////////////////////////////////////////////// + #include #include +#include namespace boost { namespace fusion { @@ -48,3 +137,4 @@ namespace boost { namespace fusion }} #endif +#endif diff --git a/include/boost/fusion/container/deque/detail/convert_impl.hpp b/include/boost/fusion/container/deque/detail/convert_impl.hpp index 1401ef1a..5dff927a 100644 --- a/include/boost/fusion/container/deque/detail/convert_impl.hpp +++ b/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -8,7 +8,7 @@ #if !defined(FUSION_CONVERT_IMPL_20061213_2207) #define FUSION_CONVERT_IMPL_20061213_2207 -#include +#include #include #include #include @@ -17,6 +17,12 @@ namespace boost { namespace fusion { struct deque_tag; + namespace result_of + { + template + struct as_deque; + } + namespace extension { template @@ -28,14 +34,11 @@ namespace boost { namespace fusion template struct apply { - typedef detail::as_deque::value> gen; - typedef typename gen:: - template apply::type>::type - type; - + typedef result_of::as_deque gen; + typedef typename gen::type type; static type call(Sequence& seq) { - return gen::call(fusion::begin(seq)); + return gen::call(seq); } }; }; diff --git a/include/boost/fusion/container/deque/detail/as_deque.hpp b/include/boost/fusion/container/deque/detail/pp_as_deque.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/as_deque.hpp rename to include/boost/fusion/container/deque/detail/pp_as_deque.hpp diff --git a/include/boost/fusion/container/generation/deque_tie.hpp b/include/boost/fusion/container/generation/deque_tie.hpp index ea0afb92..132cad95 100644 --- a/include/boost/fusion/container/generation/deque_tie.hpp +++ b/include/boost/fusion/container/generation/deque_tie.hpp @@ -1,41 +1,23 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + Copyright (c) 2001-2013 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_DEQUE_TIE_07192005_1242) -#define FUSION_DEQUE_TIE_07192005_1242 +#if !defined(FUSION_DEQUE_TIE_01272013_1401) +#define FUSION_DEQUE_TIE_01272013_1401 -#include -#include -#include -#include -#include -#include #include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" FUSION_MAX_DEQUE_SIZE_STR".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// - 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include namespace boost { namespace fusion { @@ -43,63 +25,20 @@ namespace boost { namespace fusion namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_DEQUE_SIZE, typename T, void_) - , typename Extra = void_ - > - struct deque_tie; - } - -#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_REF - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template -#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_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 -#endif + template + struct deque_tie { - typedef deque type; + typedef deque type; }; } - template - inline deque - deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + template + inline deque + deque_tie(T&... arg) { - return deque( - BOOST_PP_ENUM_PARAMS(N, _)); + return deque(arg...); } + }} -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp new file mode 100644 index 00000000..ea0afb92 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_DEQUE_TIE_07192005_1242) +#define FUSION_DEQUE_TIE_07192005_1242 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" FUSION_MAX_DEQUE_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_DEQUE_SIZE, typename T, void_) + , typename Extra = void_ + > + struct deque_tie; + } + +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_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 +#endif + { + typedef deque type; + }; + } + + template + inline deque + deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_deque.hpp b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp new file mode 100644 index 00000000..588a5aee --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp @@ -0,0 +1,118 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_DEQUE_07162005_0243) +#define FUSION_MAKE_DEQUE_07162005_0243 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_DEQUE_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_deque; + + template <> + struct make_deque<> + { + typedef deque<> type; + }; + } + + inline deque<> + make_deque() + { + return deque<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_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 +#endif + { + typedef deque type; + }; + } + + template + inline deque + make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/make_deque.hpp b/include/boost/fusion/container/generation/make_deque.hpp index fdc7dce7..4fc07efe 100644 --- a/include/boost/fusion/container/generation/make_deque.hpp +++ b/include/boost/fusion/container/generation/make_deque.hpp @@ -1,47 +1,23 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + Copyright (c) 2001-2013 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) ==============================================================================*/ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman +#if !defined(FUSION_MAKE_DEQUE_01272013_1401) +#define FUSION_MAKE_DEQUE_01272013_1401 - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_DEQUE_07162005_0243) -#define FUSION_MAKE_DEQUE_07162005_0243 - -#include -#include -#include -#include -#include #include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// - 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include namespace boost { namespace fusion { @@ -49,76 +25,20 @@ namespace boost { namespace fusion namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_DEQUE_SIZE, typename T, void_) - , typename Extra = void_ - > - struct make_deque; - - template <> - struct make_deque<> + template + struct make_deque { - typedef deque<> type; + typedef deque type; }; } - inline deque<> - make_deque() + template + inline deque::type...> + make_deque(T const&... arg) { - return deque<>(); + return deque::type...>(arg...); } - -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_AS_FUSION_ELEMENT - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + }} #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template -#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_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 -#endif - { - typedef deque type; - }; - } - - template - inline deque - make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - { - return deque( - BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp index 512d7bde..cc7a1e41 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -38,10 +38,11 @@ : vec(BOOST_PP_ENUM_PARAMS(N, _)) {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template #if N == 1 explicit #endif - vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {} #endif diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index e3d5e13f..5cb76c12 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -9,13 +9,13 @@ #if !defined(FUSION_MACRO_05042005) #define FUSION_MACRO_05042005 -#define FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT(z, n, _) m##n() -#define FUSION_VECTOR_MEMBER_MEMBER_INIT(z, n, _) m##n(_##n) +#define FUSION_VECTOR_MEMBER_DEFAULT_INIT(z, n, _) m##n() +#define FUSION_VECTOR_MEMBER_INIT(z, n, _) m##n(_##n) #define FUSION_VECTOR_MEMBER_COPY_INIT(z, n, _) m##n(other.m##n) #define FUSION_VECTOR_MEMBER_FWD(z, n, _) m##n(std::forward(other.m##n)) -#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward(_##n)) +#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward(_##n)) #define FUSION_VECTOR_MEMBER_MEMBER_DECL(z, n, _) T##n m##n; -#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward(_##n) +#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward(_##n) #define FUSION_VECTOR_MEMBER_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); @@ -47,17 +47,18 @@ struct BOOST_PP_CAT(vector_data, N) { BOOST_PP_CAT(vector_data, N)() - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_DEFAULT_INIT, _) {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + template + BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {} #endif BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param::type _)) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N) const& other) @@ -124,16 +125,24 @@ : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template #if (N == 1) explicit -#endif - BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + BOOST_PP_CAT(vector, N)(U0&& _0 + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) + : base_type(std::forward(_0)) {} +#else + BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) : base_type(BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FORWARD, _)) {} #endif -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs) : base_type(std::forward(rhs)) {} + + BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N) const& rhs) + : base_type(rhs) {} + #endif template @@ -179,6 +188,13 @@ } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + BOOST_PP_CAT(vector, N)& + operator=(BOOST_PP_CAT(vector, N) const& vec) + { + base_type::operator=(*this); + return *this; + } + BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N)&& vec) { From 6c17c04ce6604f27f81b2c6fe36b0fa58bb8abab Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 10:14:16 +0000 Subject: [PATCH 79/99] Workaround for some tests on C++11 to allow disambiguation of && and const& arguments to ctors [SVN r82631] --- test/functional/invoke.cpp | 14 ++++++++++++++ test/functional/invoke_function_object.cpp | 14 ++++++++++++++ test/functional/invoke_procedure.cpp | 15 +++++++++++++++ test/sequence/value_at.hpp | 17 +++++++++++++++-- 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/test/functional/invoke.cpp b/test/functional/invoke.cpp index d6d03ddf..67e65feb 100644 --- a/test/functional/invoke.cpp +++ b/test/functional/invoke.cpp @@ -10,6 +10,10 @@ #include #include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + #include #include @@ -371,7 +375,17 @@ int main() vector0 v0; vector1 v1(element1); vector2 v2(element1, element2); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // Note: C++11 will pickup the rvalue overload for the d argument + // since we do not have all permutations (expensive!) for all const& + // and && arguments. We either have all && or all const& arguments only. + // For that matter, use std::ref to disambiguate the call. + + vector3 v3(element1, element2, std::ref(element3)); +#else vector3 v3(element1, element2, element3); +#endif test_sequence(v0); test_sequence(v1); diff --git a/test/functional/invoke_function_object.cpp b/test/functional/invoke_function_object.cpp index 7cbe6e59..d618a495 100644 --- a/test/functional/invoke_function_object.cpp +++ b/test/functional/invoke_function_object.cpp @@ -10,6 +10,10 @@ #include #include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + #include #include @@ -209,7 +213,17 @@ int main() vector0 v0; vector1 v1(element1); vector2 v2(element1, element2); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // Note: C++11 will pickup the rvalue overload for the d argument + // since we do not have all permutations (expensive!) for all const& + // and && arguments. We either have all && or all const& arguments only. + // For that matter, use std::ref to disambiguate the call. + + vector3 v3(element1, element2, std::ref(element3)); +#else vector3 v3(element1, element2, element3); +#endif test_sequence(v0); test_sequence(v1); diff --git a/test/functional/invoke_procedure.cpp b/test/functional/invoke_procedure.cpp index f8db06cc..49c35d37 100644 --- a/test/functional/invoke_procedure.cpp +++ b/test/functional/invoke_procedure.cpp @@ -10,6 +10,10 @@ #include #include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + #include #include @@ -256,8 +260,19 @@ int main() vector0 v0; vector1 v1(element1); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // Note: C++11 will pickup the rvalue overload for the d argument + // since we do not have all permutations (expensive!) for all const& + // and && arguments. We either have all && or all const& arguments only. + // For that matter, use std::ref to disambiguate the call. + + vector2 v2(std::ref(element1), element2); + vector3 v3(std::ref(element1), element2, std::ref(element3)); +#else vector2 v2(element1, element2); vector3 v3(element1, element2, element3); +#endif test_sequence(v0); test_sequence(v1); diff --git a/test/sequence/value_at.hpp b/test/sequence/value_at.hpp index 9fe3a198..ae03dd3c 100644 --- a/test/sequence/value_at.hpp +++ b/test/sequence/value_at.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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 @@ -11,6 +11,10 @@ #include #include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + #if !defined(FUSION_AT) #define FUSION_AT at_c #endif @@ -35,7 +39,16 @@ test() double d = 2.7; A a; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // Note: C++11 will pickup the rvalue overload for the d argument + // since we do not have all permutations (expensive!) for all const& + // and && arguments. We either have all && or all const& arguments only. + // For that matter, use std::ref to disambiguate the call. + + FUSION_SEQUENCE t(1, std::ref(d), a, 2); +#else FUSION_SEQUENCE t(1, d, a, 2); +#endif const FUSION_SEQUENCE ct(t); int i = FUSION_AT<0>(t); @@ -66,7 +79,7 @@ test() ++FUSION_AT<0>(t); BOOST_TEST(FUSION_AT<0>(t) == 6); - + typedef FUSION_SEQUENCE seq_type; BOOST_STATIC_ASSERT(!( From f1687bffcfb4c3b471edf884091f98fd6b8ed501 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 10:14:40 +0000 Subject: [PATCH 80/99] Added LF at the end [SVN r82632] --- include/boost/fusion/container/generation/deque_tie.hpp | 3 ++- include/boost/fusion/container/generation/make_deque.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/container/generation/deque_tie.hpp b/include/boost/fusion/container/generation/deque_tie.hpp index 132cad95..a2c75fce 100644 --- a/include/boost/fusion/container/generation/deque_tie.hpp +++ b/include/boost/fusion/container/generation/deque_tie.hpp @@ -41,4 +41,5 @@ namespace boost { namespace fusion }} #endif -#endif \ No newline at end of file +#endif + diff --git a/include/boost/fusion/container/generation/make_deque.hpp b/include/boost/fusion/container/generation/make_deque.hpp index 4fc07efe..f0178c5c 100644 --- a/include/boost/fusion/container/generation/make_deque.hpp +++ b/include/boost/fusion/container/generation/make_deque.hpp @@ -41,4 +41,5 @@ namespace boost { namespace fusion }} #endif -#endif \ No newline at end of file +#endif + From f96bbef8fa3dc929c33784b9b821f662febfd5ba Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 12:15:26 +0000 Subject: [PATCH 81/99] MSVC (VC11) fixes for latest updates [SVN r82634] --- .../deque/detail/deque_forward_ctor.hpp | 15 +++++++--- .../deque/detail/deque_keyed_values_call.hpp | 11 +++---- .../container/deque/detail/pp_as_deque.hpp | 2 +- .../container/deque/detail/pp_deque.hpp | 29 +++++++++++++++++-- .../deque/detail/pp_deque_keyed_values.hpp | 2 +- .../generation/detail/pp_deque_tie.hpp | 6 ++-- .../generation/detail/pp_make_deque.hpp | 9 ++++-- .../vector/detail/vector_forward_ctor.hpp | 6 ++-- 8 files changed, 58 insertions(+), 22 deletions(-) diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp index 30db3263..805b9d55 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -13,7 +13,7 @@ #error "C++03 only! This file should not have been included" #endif -#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward(t##n) +#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward(t##n) #include #include @@ -30,14 +30,21 @@ #define N BOOST_PP_ITERATION() +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) : base(detail::deque_keyed_values::construct(BOOST_PP_ENUM_PARAMS(N, t))) {} -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) +#else + +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& t)) + : base(detail::deque_keyed_values::construct(BOOST_PP_ENUM_PARAMS(N, t))) +{} + +template +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t)) : base(detail::deque_keyed_values:: - forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) + forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) {} #endif diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp index d457516f..eb0d115e 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -19,7 +19,7 @@ #include #define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \ - std::forward(BOOST_PP_CAT(t, n)) + std::forward(BOOST_PP_CAT(t, n)) #define BOOST_PP_FILENAME_1 \ @@ -40,16 +40,17 @@ #if N > 1 , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) #endif - >::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); + >::construct(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); } - static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) + template + static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t)) { - return type(std::forward(t0), + return type(std::forward(t0), deque_keyed_values_impl< next_index #if N > 1 - , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) + , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T_) #endif >::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _))); } diff --git a/include/boost/fusion/container/deque/detail/pp_as_deque.hpp b/include/boost/fusion/container/deque/detail/pp_as_deque.hpp index 906f4fb6..3532bfc6 100644 --- a/include/boost/fusion/container/deque/detail/pp_as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/pp_as_deque.hpp @@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail typedef typename fusion::result_of::value_of::type \ BOOST_PP_CAT(T, n); -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/deque/detail/pp_deque.hpp b/include/boost/fusion/container/deque/detail/pp_deque.hpp index 6d3b4987..7169da09 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque.hpp @@ -92,8 +92,11 @@ namespace boost { namespace fusion { {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - explicit deque(T0&& t0) - : base(std::forward(t0), detail::nil_keyed_element()) + template + explicit deque(T0_&& t0 + , typename enable_if >::type* /*dummy*/ = 0 + ) + : base(std::forward(t0), detail::nil_keyed_element()) {} explicit deque(deque&& rhs) @@ -145,6 +148,28 @@ namespace boost { namespace fusion { #endif }; + + template <> + struct deque<> : detail::nil_keyed_element + { + typedef deque_tag fusion_tag; + typedef bidirectional_traversal_tag category; + typedef mpl::int_<0> size; + typedef mpl::int_<0> next_up; + typedef mpl::int_<0> next_down; + typedef mpl::false_ is_view; + + template + deque(Sequence const&, + typename enable_if< + mpl::and_< + traits::is_sequence + , result_of::empty>>::type* /*dummy*/ = 0) + {} + + deque() {} + }; + }} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp index a7c4939a..b27f4af4 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp @@ -68,7 +68,7 @@ namespace boost { namespace fusion { namespace detail { typedef nil_keyed_element type; - static type call() + static type construct() { return type(); } diff --git a/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp index ea0afb92..174b58b0 100644 --- a/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp +++ b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp @@ -6,8 +6,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_DEQUE_TIE_07192005_1242) -#define FUSION_DEQUE_TIE_07192005_1242 +#if !defined(FUSION_PP_DEQUE_TIE_07192005_1242) +#define FUSION_PP_DEQUE_TIE_07192005_1242 #include #include @@ -53,7 +53,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/generation/detail/pp_make_deque.hpp b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp index 588a5aee..ca478635 100644 --- a/include/boost/fusion/container/generation/detail/pp_make_deque.hpp +++ b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp @@ -6,8 +6,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_DEQUE_07162005_0243) -#define FUSION_MAKE_DEQUE_07162005_0243 +#if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243) +#define FUSION_MAKE_PP_DEQUE_07162005_0243 #include #include @@ -66,7 +66,10 @@ namespace boost { namespace fusion #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ typename detail::as_fusion_element::type -#define BOOST_PP_FILENAME_1 +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp index cc7a1e41..bd65d436 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -12,14 +12,14 @@ #include #include -#define FUSION_FORWARD_CTOR_MOVE(z, n, _) std::move(_##n) +#define FUSION_FORWARD_CTOR_FORWARD(z, n, _) std::forward(_##n) #define BOOST_PP_FILENAME_1 \ #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() -#undef FUSION_FORWARD_CTOR_MOVE +#undef FUSION_FORWARD_CTOR_FORWARD #endif #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// @@ -43,7 +43,7 @@ explicit #endif vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) - : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {} + : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, _)) {} #endif #undef N From 1823f30420e7683a42b899f7777d849fa4ae0006 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 27 Jan 2013 14:41:39 +0000 Subject: [PATCH 82/99] Some cleanup [SVN r82636] --- .../container/vector/detail/vector_n.hpp | 53 ++++++++++++------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 5cb76c12..011a32df 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -9,21 +9,34 @@ #if !defined(FUSION_MACRO_05042005) #define FUSION_MACRO_05042005 -#define FUSION_VECTOR_MEMBER_DEFAULT_INIT(z, n, _) m##n() -#define FUSION_VECTOR_MEMBER_INIT(z, n, _) m##n(_##n) -#define FUSION_VECTOR_MEMBER_COPY_INIT(z, n, _) m##n(other.m##n) -#define FUSION_VECTOR_MEMBER_FWD(z, n, _) m##n(std::forward(other.m##n)) -#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward(_##n)) -#define FUSION_VECTOR_MEMBER_MEMBER_DECL(z, n, _) T##n m##n; -#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward(_##n) +#define FUSION_VECTOR_CTOR_DEFAULT_INIT(z, n, _) \ + m##n() -#define FUSION_VECTOR_MEMBER_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_CTOR_INIT(z, n, _) \ + m##n(_##n) + +#define FUSION_VECTOR_MEMBER_CTOR_INIT(z, n, _) \ + m##n(other.m##n) + +#define FUSION_VECTOR_CTOR_FORWARD(z, n, _) \ + m##n(std::forward(other.m##n)) + +#define FUSION_VECTOR_CTOR_ARG_FWD(z, n, _) \ + m##n(std::forward(_##n)) + +#define FUSION_VECTOR_MEMBER_DECL(z, n, _) \ + T##n m##n; + +#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) \ + std::forward(_##n) + +#define FUSION_VECTOR_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); -#define FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_MEMBER_DEREF_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n); -#define FUSION_VECTOR_MEMBER_MEMBER_FORWARD(z, n, _) \ +#define FUSION_VECTOR_MEMBER_MOVE(z, n, _) \ this->BOOST_PP_CAT(m, n) = std::forward< \ BOOST_PP_CAT(T, n)>(vec.BOOST_PP_CAT(m, n)); @@ -47,33 +60,33 @@ struct BOOST_PP_CAT(vector_data, N) { BOOST_PP_CAT(vector_data, N)() - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_DEFAULT_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_DEFAULT_INIT, _) {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) - : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_ARG_FWD, _) {} #endif BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param::type _)) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N) const& other) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_COPY_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_CTOR_INIT, _) {} #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N)&& other) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FWD, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_FORWARD, _) {} #endif BOOST_PP_CAT(vector_data, N)& operator=(BOOST_PP_CAT(vector_data, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_ASSIGN, _) return *this; } @@ -97,7 +110,7 @@ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_DECL, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DECL, _) }; template @@ -172,7 +185,7 @@ BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_ASSIGN, _) return *this; } @@ -183,7 +196,7 @@ typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(seq); BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_VECTOR_MEMBER_ITER_DECL_VAR, _) - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DEREF_ASSIGN, _) return *this; } @@ -198,7 +211,7 @@ BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N)&& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_FORWARD, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MOVE, _) return *this; } #endif From 5a520585d8f489a95d044b313ac4511f71944f50 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 31 Jan 2013 13:01:36 +0000 Subject: [PATCH 83/99] Fixes #7955 [SVN r82668] --- include/boost/fusion/algorithm/auxiliary/copy.hpp | 2 +- include/boost/fusion/algorithm/auxiliary/move.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/algorithm/auxiliary/copy.hpp b/include/boost/fusion/algorithm/auxiliary/copy.hpp index fd866468..c69e4bd5 100644 --- a/include/boost/fusion/algorithm/auxiliary/copy.hpp +++ b/include/boost/fusion/algorithm/auxiliary/copy.hpp @@ -69,7 +69,7 @@ namespace boost { namespace fusion copy(Seq1 const& src, Seq2& dest) { BOOST_STATIC_ASSERT( - result_of::size::value == result_of::size::value); + result_of::size::value <= result_of::size::value); detail::sequence_copy< Seq1 const, Seq2>:: diff --git a/include/boost/fusion/algorithm/auxiliary/move.hpp b/include/boost/fusion/algorithm/auxiliary/move.hpp index 6ed968da..68422da9 100644 --- a/include/boost/fusion/algorithm/auxiliary/move.hpp +++ b/include/boost/fusion/algorithm/auxiliary/move.hpp @@ -69,7 +69,7 @@ namespace boost { namespace fusion move(Seq1&& src, Seq2& dest) { BOOST_STATIC_ASSERT( - result_of::size::value == result_of::size::value); + result_of::size::value <= result_of::size::value); detail::sequence_move< Seq1, Seq2>:: From 9dcdfa323f19b81b37ee50061612af5057c2f50f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 31 Jan 2013 15:31:28 +0000 Subject: [PATCH 84/99] Better deque conversion [SVN r82669] --- .../boost/fusion/container/deque/convert.hpp | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 33176dc9..09b01291 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -43,6 +43,21 @@ namespace boost { namespace fusion } }; + template + struct push_front_deque; + + template + struct push_front_deque> + { + typedef deque type; + + static type + call(T const& first, deque const& rest) + { + return type(front_extended_deque, T>(rest, first)); + } + }; + template struct build_deque { @@ -50,16 +65,19 @@ namespace boost { namespace fusion build_deque::type, Last> next_build_deque; - typedef front_extended_deque< - typename next_build_deque::type - , typename result_of::value_of::type> - type; + typedef push_front_deque< + typename result_of::value_of::type + , typename next_build_deque::type> + push_front; + + typedef typename push_front::type type; static type call(First const& f, Last const& l) { typename result_of::value_of::type v = *f; - return type(next_build_deque::call(fusion::next(f), l), v); + return push_front::call( + v, next_build_deque::call(fusion::next(f), l)); } }; } @@ -102,6 +120,7 @@ namespace boost { namespace fusion #include #include #include +#include namespace boost { namespace fusion { From 4272519a3c802a47c9ad9f9aad857d13be41eb01 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 31 Jan 2013 15:56:00 +0000 Subject: [PATCH 85/99] cleanup [SVN r82670] --- .../boost/fusion/container/deque/convert.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 09b01291..85b98c60 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -46,6 +46,18 @@ namespace boost { namespace fusion template struct push_front_deque; + template + struct push_front_deque> + { + typedef deque type; + + static type + call(T const& first, deque<>) + { + return type(first); + } + }; + template struct push_front_deque> { @@ -54,7 +66,10 @@ namespace boost { namespace fusion static type call(T const& first, deque const& rest) { - return type(front_extended_deque, T>(rest, first)); + typedef + front_extended_deque, T> + front_extended; + return type(front_extended(rest, first)); } }; From a1a6e42590ea08f9b5c9267fa516dc39f94cefd5 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 3 Feb 2013 10:13:41 +0000 Subject: [PATCH 86/99] Removing the preprocessed file generation which is meant for internal use only [SVN r82697] --- preprocess/preprocess.bat | 7 ------- preprocess/preprocess.cpp | 10 ---------- preprocess/wave.cfg | 14 -------------- 3 files changed, 31 deletions(-) delete mode 100644 preprocess/preprocess.bat delete mode 100644 preprocess/preprocess.cpp delete mode 100644 preprocess/wave.cfg diff --git a/preprocess/preprocess.bat b/preprocess/preprocess.bat deleted file mode 100644 index f5c94977..00000000 --- a/preprocess/preprocess.bat +++ /dev/null @@ -1,7 +0,0 @@ - - -wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=10 -DFUSION_MAX_LIST_SIZE=10 -DFUSION_MAX_ZIP_SEQUENCES=10 preprocess.cpp -wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=20 -DFUSION_MAX_LIST_SIZE=20 -DFUSION_MAX_ZIP_SEQUENCES=20 preprocess.cpp -wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=30 -DFUSION_MAX_LIST_SIZE=30 -DFUSION_MAX_ZIP_SEQUENCES=30 preprocess.cpp -wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=40 -DFUSION_MAX_LIST_SIZE=40 -DFUSION_MAX_ZIP_SEQUENCES=40 preprocess.cpp -wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=50 -DFUSION_MAX_LIST_SIZE=50 -DFUSION_MAX_ZIP_SEQUENCES=50 preprocess.cpp diff --git a/preprocess/preprocess.cpp b/preprocess/preprocess.cpp deleted file mode 100644 index 1cc59ef3..00000000 --- a/preprocess/preprocess.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/*============================================================================= - Copyright (c) 2011 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 -#include - diff --git a/preprocess/wave.cfg b/preprocess/wave.cfg deleted file mode 100644 index 6d13cf63..00000000 --- a/preprocess/wave.cfg +++ /dev/null @@ -1,14 +0,0 @@ --DBOOST_FUSION_DONT_USE_PREPROCESSED_FILES --DBOOST_FUSION_CREATE_PREPROCESSED_FILES --SC:/dev/boost --SC:/dev/tools/mingw/include --SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include --SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include/c++ --SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include/c++/mingw32 ---variadics --NBOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL --NBOOST_PROTO_USE_GET_POINTER --NBOOST_PROTO_GET_POINTER ---timer - - From fec1da027c9f0f07e938f7caff837ad167b8fafb Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 3 Feb 2013 10:31:46 +0000 Subject: [PATCH 87/99] Cleanup deque to clearly separate the C++03 code from c++11 code [SVN r82698] --- .../boost/fusion/container/deque/convert.hpp | 132 ++---------------- .../boost/fusion/container/deque/deque.hpp | 4 +- .../fusion/container/deque/deque_fwd.hpp | 2 +- .../{pp_as_deque.hpp => cpp03/as_deque.hpp} | 4 +- .../detail/{pp_deque.hpp => cpp03/deque.hpp} | 12 +- .../detail/{ => cpp03}/deque_forward_ctor.hpp | 2 +- .../{pp_deque_fwd.hpp => cpp03/deque_fwd.hpp} | 6 +- .../detail/{ => cpp03}/deque_initial_size.hpp | 2 +- .../deque_keyed_values.hpp} | 6 +- .../{ => cpp03}/deque_keyed_values_call.hpp | 2 +- .../deque/{ => detail/cpp03}/limits.hpp | 0 .../{ => cpp03}/preprocessed/as_deque.hpp | 10 +- .../{ => cpp03}/preprocessed/as_deque10.hpp | 0 .../{ => cpp03}/preprocessed/as_deque20.hpp | 0 .../{ => cpp03}/preprocessed/as_deque30.hpp | 0 .../{ => cpp03}/preprocessed/as_deque40.hpp | 0 .../{ => cpp03}/preprocessed/as_deque50.hpp | 0 .../detail/{ => cpp03}/preprocessed/deque.hpp | 10 +- .../{ => cpp03}/preprocessed/deque10.hpp | 0 .../{ => cpp03}/preprocessed/deque10_fwd.hpp | 0 .../{ => cpp03}/preprocessed/deque20.hpp | 0 .../{ => cpp03}/preprocessed/deque20_fwd.hpp | 0 .../{ => cpp03}/preprocessed/deque30.hpp | 0 .../{ => cpp03}/preprocessed/deque30_fwd.hpp | 0 .../{ => cpp03}/preprocessed/deque40.hpp | 0 .../{ => cpp03}/preprocessed/deque40_fwd.hpp | 0 .../{ => cpp03}/preprocessed/deque50.hpp | 0 .../{ => cpp03}/preprocessed/deque50_fwd.hpp | 0 .../{ => cpp03}/preprocessed/deque_fwd.hpp | 10 +- .../preprocessed/deque_initial_size.hpp | 10 +- .../preprocessed/deque_initial_size10.hpp | 0 .../preprocessed/deque_initial_size20.hpp | 0 .../preprocessed/deque_initial_size30.hpp | 0 .../preprocessed/deque_initial_size40.hpp | 0 .../preprocessed/deque_initial_size50.hpp | 0 .../preprocessed/deque_keyed_values.hpp | 10 +- .../preprocessed/deque_keyed_values10.hpp | 0 .../preprocessed/deque_keyed_values20.hpp | 0 .../preprocessed/deque_keyed_values30.hpp | 0 .../preprocessed/deque_keyed_values40.hpp | 0 .../preprocessed/deque_keyed_values50.hpp | 0 ...eyed_values.hpp => deque_keyed_values.hpp} | 0 42 files changed, 53 insertions(+), 169 deletions(-) rename include/boost/fusion/container/deque/detail/{pp_as_deque.hpp => cpp03/as_deque.hpp} (97%) rename include/boost/fusion/container/deque/detail/{pp_deque.hpp => cpp03/deque.hpp} (92%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/deque_forward_ctor.hpp (96%) rename include/boost/fusion/container/deque/detail/{pp_deque_fwd.hpp => cpp03/deque_fwd.hpp} (87%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/deque_initial_size.hpp (96%) rename include/boost/fusion/container/deque/detail/{pp_deque_keyed_values.hpp => cpp03/deque_keyed_values.hpp} (93%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/deque_keyed_values_call.hpp (96%) rename include/boost/fusion/container/deque/{ => detail/cpp03}/limits.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque.hpp (62%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque10.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque20.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque30.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque40.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/as_deque50.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque.hpp (62%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque10.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque10_fwd.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque20.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque20_fwd.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque30.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque30_fwd.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque40.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque40_fwd.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque50.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque50_fwd.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_fwd.hpp (61%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size.hpp (59%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size10.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size20.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size30.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size40.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_initial_size50.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values.hpp (59%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values10.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values20.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values30.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values40.hpp (100%) rename include/boost/fusion/container/deque/detail/{ => cpp03}/preprocessed/deque_keyed_values50.hpp (100%) rename include/boost/fusion/container/deque/detail/{variadic_deque_keyed_values.hpp => deque_keyed_values.hpp} (100%) diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 85b98c60..4f9eb7ce 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -11,92 +11,20 @@ #include #include -#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) - -#include -#include -#include -#include -#include -#include -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +/////////////////////////////////////////////////////////////////////////////// +// C++03 (non-variadic) implementation +/////////////////////////////////////////////////////////////////////////////// +#include +#else /////////////////////////////////////////////////////////////////////////////// // C++11 variadic implementation /////////////////////////////////////////////////////////////////////////////// +#include + namespace boost { namespace fusion { - namespace detail - { - template ::value> - struct build_deque; - - template - struct build_deque - { - typedef deque<> type; - static type - call(First const&, Last const&) - { - return type(); - } - }; - - template - struct push_front_deque; - - template - struct push_front_deque> - { - typedef deque type; - - static type - call(T const& first, deque<>) - { - return type(first); - } - }; - - template - struct push_front_deque> - { - typedef deque type; - - static type - call(T const& first, deque const& rest) - { - typedef - front_extended_deque, T> - front_extended; - return type(front_extended(rest, first)); - } - }; - - template - struct build_deque - { - typedef - build_deque::type, Last> - next_build_deque; - - typedef push_front_deque< - typename result_of::value_of::type - , typename next_build_deque::type> - push_front; - - typedef typename push_front::type type; - - static type - call(First const& f, Last const& l) - { - typename result_of::value_of::type v = *f; - return push_front::call( - v, next_build_deque::call(fusion::next(f), l)); - } - }; - } - namespace result_of { template @@ -126,49 +54,5 @@ namespace boost { namespace fusion } }} -#else - -/////////////////////////////////////////////////////////////////////////////// -// C++03 (non-variadic) implementation -/////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include - -namespace boost { namespace fusion -{ - namespace result_of - { - template - struct as_deque - { - typedef typename - detail::as_deque::value> - gen; - typedef typename gen:: - template apply::type>::type - type; - }; - } - - template - inline typename result_of::as_deque::type - as_deque(Sequence& seq) - { - typedef typename result_of::as_deque::gen gen; - return gen::call(fusion::begin(seq)); - } - - template - inline typename result_of::as_deque::type - as_deque(Sequence const& seq) - { - typedef typename result_of::as_deque::gen gen; - return gen::call(fusion::begin(seq)); - } -}} - #endif #endif diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 9fbd9994..53623a9a 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -14,7 +14,7 @@ // With variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -# include +# include #else # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # define BOOST_FUSION_HAS_VARIADIC_DEQUE @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index 0c8f4ea8..2112ed0a 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -16,7 +16,7 @@ #if (defined(BOOST_NO_CXX11_DECLTYPE) \ || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) -# include +# include #else # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # define BOOST_FUSION_HAS_VARIADIC_DEQUE diff --git a/include/boost/fusion/container/deque/detail/pp_as_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp similarity index 97% rename from include/boost/fusion/container/deque/detail/pp_as_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp index 3532bfc6..85b377f8 100644 --- a/include/boost/fusion/container/deque/detail/pp_as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp @@ -45,7 +45,7 @@ namespace boost { namespace fusion { namespace detail }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") @@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail typedef typename fusion::result_of::value_of::type \ BOOST_PP_CAT(T, n); -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/deque/detail/pp_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp similarity index 92% rename from include/boost/fusion/container/deque/detail/pp_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque.hpp index 7169da09..2e25a690 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -12,11 +12,11 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -40,10 +40,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #endif /*============================================================================= @@ -78,7 +78,7 @@ namespace boost { namespace fusion { mpl::if_ >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down; typedef mpl::false_ is_view; -#include +#include deque() {} diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp similarity index 96% rename from include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp index 805b9d55..b049d76e 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp @@ -20,7 +20,7 @@ #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp similarity index 87% rename from include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp index 354cfccd..0da8bd22 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp @@ -12,14 +12,14 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp") #endif /*============================================================================= diff --git a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp similarity index 96% rename from include/boost/fusion/container/deque/detail/deque_initial_size.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp index 21075ef4..5ac245d9 100644 --- a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp @@ -25,7 +25,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_initial_size" FUSION_MAX_DEQUE_SIZE_STR ".hpp") diff --git a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp similarity index 93% rename from include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp index b27f4af4..13ec1da7 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp @@ -12,7 +12,7 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #include @@ -34,7 +34,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_keyed_values" FUSION_MAX_DEQUE_SIZE_STR ".hpp") @@ -89,7 +89,7 @@ namespace boost { namespace fusion { namespace detail BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail; typedef keyed_element type; -#include +#include }; diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp similarity index 96% rename from include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp index eb0d115e..0b8543b6 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp @@ -22,7 +22,7 @@ std::forward(BOOST_PP_CAT(t, n)) #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/deque/limits.hpp b/include/boost/fusion/container/deque/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/deque/limits.hpp rename to include/boost/fusion/container/deque/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp similarity index 62% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp index f383bea2..abc2890a 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp similarity index 62% rename from include/boost/fusion/container/deque/detail/preprocessed/deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp index 404d20b7..3a5a21e2 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp similarity index 61% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp index a0b75b7c..9a770b9e 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp similarity index 59% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp index a26dfdb2..9431abe2 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp similarity index 59% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp index 2460dda5..6e796865 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp diff --git a/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/deque_keyed_values.hpp From d128c6f6aae11b94573103365b18e3e943dae376 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 3 Feb 2013 11:50:48 +0000 Subject: [PATCH 88/99] Moving non-variadic map implementation to detail/cpp03 directory [SVN r82701] --- include/boost/fusion/container/deque.hpp | 1 + .../container/deque/detail/build_deque.hpp | 74 ++++++++++++++ .../deque/detail/cpp03/build_deque.hpp | 52 ++++++++++ .../fusion/container/generation/map_tie.hpp | 2 +- include/boost/fusion/container/map.hpp | 1 - .../boost/fusion/container/map/convert.hpp | 41 +------- .../map/detail/{ => cpp03}/as_map.hpp | 6 +- .../map/detail/{ => cpp03}/at_impl.hpp | 0 .../map/detail/{ => cpp03}/begin_impl.hpp | 0 .../container/map/detail/cpp03/convert.hpp | 47 +++++++++ .../map/detail/{ => cpp03}/convert_impl.hpp | 4 +- .../detail/{ => cpp03}/deref_data_impl.hpp | 0 .../map/detail/{ => cpp03}/deref_impl.hpp | 0 .../map/detail/{ => cpp03}/end_impl.hpp | 0 .../map/detail/{ => cpp03}/key_of_impl.hpp | 2 +- .../map/{ => detail/cpp03}/limits.hpp | 0 .../fusion/container/map/detail/cpp03/map.hpp | 99 +++++++++++++++++++ .../detail/{ => cpp03}/map_forward_ctor.hpp | 2 +- .../container/map/detail/cpp03/map_fwd.hpp | 52 ++++++++++ .../{ => cpp03}/preprocessed/as_map.hpp | 10 +- .../{ => cpp03}/preprocessed/as_map10.hpp | 0 .../{ => cpp03}/preprocessed/as_map20.hpp | 0 .../{ => cpp03}/preprocessed/as_map30.hpp | 0 .../{ => cpp03}/preprocessed/as_map40.hpp | 0 .../{ => cpp03}/preprocessed/as_map50.hpp | 0 .../detail/{ => cpp03}/preprocessed/map.hpp | 10 +- .../detail/{ => cpp03}/preprocessed/map10.hpp | 0 .../{ => cpp03}/preprocessed/map10_fwd.hpp | 0 .../detail/{ => cpp03}/preprocessed/map20.hpp | 0 .../{ => cpp03}/preprocessed/map20_fwd.hpp | 0 .../detail/{ => cpp03}/preprocessed/map30.hpp | 0 .../{ => cpp03}/preprocessed/map30_fwd.hpp | 0 .../detail/{ => cpp03}/preprocessed/map40.hpp | 0 .../{ => cpp03}/preprocessed/map40_fwd.hpp | 0 .../detail/{ => cpp03}/preprocessed/map50.hpp | 0 .../{ => cpp03}/preprocessed/map50_fwd.hpp | 0 .../{ => cpp03}/preprocessed/map_fwd.hpp | 10 +- .../map/detail/{ => cpp03}/value_at_impl.hpp | 0 .../detail/{ => cpp03}/value_of_data_impl.hpp | 2 +- .../map/detail/{ => cpp03}/value_of_impl.hpp | 0 include/boost/fusion/container/map/map.hpp | 93 +---------------- .../boost/fusion/container/map/map_fwd.hpp | 46 +-------- 42 files changed, 358 insertions(+), 196 deletions(-) create mode 100644 include/boost/fusion/container/deque/detail/build_deque.hpp create mode 100644 include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp rename include/boost/fusion/container/map/detail/{ => cpp03}/as_map.hpp (95%) rename include/boost/fusion/container/map/detail/{ => cpp03}/at_impl.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/begin_impl.hpp (100%) create mode 100644 include/boost/fusion/container/map/detail/cpp03/convert.hpp rename include/boost/fusion/container/map/detail/{ => cpp03}/convert_impl.hpp (91%) rename include/boost/fusion/container/map/detail/{ => cpp03}/deref_data_impl.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/deref_impl.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/end_impl.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/key_of_impl.hpp (92%) rename include/boost/fusion/container/map/{ => detail/cpp03}/limits.hpp (100%) create mode 100644 include/boost/fusion/container/map/detail/cpp03/map.hpp rename include/boost/fusion/container/map/detail/{ => cpp03}/map_forward_ctor.hpp (94%) create mode 100644 include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map.hpp (62%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map10.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map20.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map30.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map40.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/as_map50.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map.hpp (63%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map10.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map10_fwd.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map20.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map20_fwd.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map30.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map30_fwd.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map40.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map40_fwd.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map50.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map50_fwd.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/preprocessed/map_fwd.hpp (62%) rename include/boost/fusion/container/map/detail/{ => cpp03}/value_at_impl.hpp (100%) rename include/boost/fusion/container/map/detail/{ => cpp03}/value_of_data_impl.hpp (93%) rename include/boost/fusion/container/map/detail/{ => cpp03}/value_of_impl.hpp (100%) diff --git a/include/boost/fusion/container/deque.hpp b/include/boost/fusion/container/deque.hpp index 0ee058a3..d750eab6 100644 --- a/include/boost/fusion/container/deque.hpp +++ b/include/boost/fusion/container/deque.hpp @@ -8,6 +8,7 @@ #if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036) #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 +#include #include #include diff --git a/include/boost/fusion/container/deque/detail/build_deque.hpp b/include/boost/fusion/container/deque/detail/build_deque.hpp new file mode 100644 index 00000000..bd713f9f --- /dev/null +++ b/include/boost/fusion/container/deque/detail/build_deque.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BUILD_DEQUE_02032013_1921) +#define BOOST_FUSION_BUILD_DEQUE_02032013_1921 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template ::value> + struct build_deque; + + template + struct build_deque + { + typedef deque<> type; + static type + call(First const&, Last const&) + { + return type(); + } + }; + + template + struct push_front_deque; + + template + struct push_front_deque> + { + typedef deque type; + + static type + call(T const& first, deque const& rest) + { + return type(front_extended_deque, T>(rest, first)); + } + }; + + template + struct build_deque + { + typedef + build_deque::type, Last> + next_build_deque; + + typedef push_front_deque< + typename result_of::value_of::type + , typename next_build_deque::type> + push_front; + + typedef typename push_front::type type; + + static type + call(First const& f, Last const& l) + { + typename result_of::value_of::type v = *f; + return push_front::call( + v, next_build_deque::call(fusion::next(f), l)); + } + }; +}}} + +#endif diff --git a/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp new file mode 100644 index 00000000..2dcce7d6 --- /dev/null +++ b/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BUILD_DEQUE_02032013_1921) +#define BOOST_FUSION_BUILD_DEQUE_02032013_1921 + +#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +#error "C++03 only! This file should not have been included" +#endif + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_deque + { + typedef typename + detail::as_deque::value> + gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence const& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/include/boost/fusion/container/generation/map_tie.hpp b/include/boost/fusion/container/generation/map_tie.hpp index 26fc2dfa..4e8b3854 100644 --- a/include/boost/fusion/container/generation/map_tie.hpp +++ b/include/boost/fusion/container/generation/map_tie.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/container/map.hpp b/include/boost/fusion/container/map.hpp index b9e8cd2c..8e7cd68d 100644 --- a/include/boost/fusion/container/map.hpp +++ b/include/boost/fusion/container/map.hpp @@ -7,7 +7,6 @@ #if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606) #define FUSION_SEQUENCE_CLASS_MAP_10022005_0606 -#include #include #include #include diff --git a/include/boost/fusion/container/map/convert.hpp b/include/boost/fusion/container/map/convert.hpp index 5bb6fc9d..5c93bbc0 100644 --- a/include/boost/fusion/container/map/convert.hpp +++ b/include/boost/fusion/container/map/convert.hpp @@ -4,44 +4,9 @@ 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(FUSION_CONVERT_09232005_1340) -#define FUSION_CONVERT_09232005_1340 +#if !defined(FUSION_CONVERT_MAIN_09232005_1340) +#define FUSION_CONVERT_MAIN_09232005_1340 -#include -#include -#include -#include -#include - -namespace boost { namespace fusion -{ - namespace result_of - { - template - struct as_map - { - typedef typename detail::as_map::value> gen; - typedef typename gen:: - template apply::type>::type - type; - }; - } - - template - inline typename result_of::as_map::type - as_map(Sequence& seq) - { - typedef typename result_of::as_map::gen gen; - return gen::call(fusion::begin(seq)); - } - - template - inline typename result_of::as_map::type - as_map(Sequence const& seq) - { - typedef typename result_of::as_map::gen gen; - return gen::call(fusion::begin(seq)); - } -}} +#include #endif diff --git a/include/boost/fusion/container/map/detail/as_map.hpp b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp similarity index 95% rename from include/boost/fusion/container/map/detail/as_map.hpp rename to include/boost/fusion/container/map/detail/cpp03/as_map.hpp index b1a4d09f..3654a4de 100644 --- a/include/boost/fusion/container/map/detail/as_map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ namespace boost { namespace fusion { namespace detail }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_map" FUSION_MAX_MAP_SIZE_STR ".hpp") @@ -77,7 +77,7 @@ namespace boost { namespace fusion { namespace detail typedef typename fusion::result_of::value_of::type \ BOOST_PP_CAT(T, n); -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/at_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/at_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/at_impl.hpp diff --git a/include/boost/fusion/container/map/detail/begin_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/begin_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/begin_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/begin_impl.hpp diff --git a/include/boost/fusion/container/map/detail/cpp03/convert.hpp b/include/boost/fusion/container/map/detail/cpp03/convert.hpp new file mode 100644 index 00000000..b35d0d06 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/convert.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2011 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) +==============================================================================*/ +#if !defined(FUSION_CONVERT_09232005_1340) +#define FUSION_CONVERT_09232005_1340 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_map + { + typedef typename detail::as_map::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_map::type + as_map(Sequence& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_map::type + as_map(Sequence const& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/convert_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp similarity index 91% rename from include/boost/fusion/container/map/detail/convert_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp index c4b9389d..1634a44b 100644 --- a/include/boost/fusion/container/map/detail/convert_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp @@ -8,8 +8,8 @@ #if !defined(FUSION_CONVERT_IMPL_09232005_1340) #define FUSION_CONVERT_IMPL_09232005_1340 -#include -#include +#include +#include #include #include diff --git a/include/boost/fusion/container/map/detail/deref_data_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/deref_data_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp diff --git a/include/boost/fusion/container/map/detail/deref_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/deref_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/deref_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/deref_impl.hpp diff --git a/include/boost/fusion/container/map/detail/end_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/end_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/end_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/end_impl.hpp diff --git a/include/boost/fusion/container/map/detail/key_of_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp similarity index 92% rename from include/boost/fusion/container/map/detail/key_of_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp index 5a90c037..ce40c3f7 100644 --- a/include/boost/fusion/container/map/detail/key_of_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP #define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP -#include +#include namespace boost { namespace fusion { namespace extension { diff --git a/include/boost/fusion/container/map/limits.hpp b/include/boost/fusion/container/map/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/map/limits.hpp rename to include/boost/fusion/container/map/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/map/detail/cpp03/map.hpp b/include/boost/fusion/container/map/detail/cpp03/map.hpp new file mode 100644 index 00000000..e0abd49c --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/map.hpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2011 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) +==============================================================================*/ +#if !defined(FUSION_MAP_07212005_1106) +#define FUSION_MAP_07212005_1106 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map" FUSION_MAX_MAP_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct map : sequence_base > + { + struct category : random_access_traversal_tag, associative_tag {}; + + typedef map_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> + storage_type; + + typedef typename storage_type::size size; + + map() + : data() {} + + template + map(Sequence const& rhs) + : data(rhs) {} + + #include + + template + map& + operator=(T const& rhs) + { + data = rhs; + return *this; + } + + storage_type& get_data() { return data; } + storage_type const& get_data() const { return data; } + + private: + + storage_type data; + }; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/map/detail/map_forward_ctor.hpp b/include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp similarity index 94% rename from include/boost/fusion/container/map/detail/map_forward_ctor.hpp rename to include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp index c0f983c4..50e78040 100644 --- a/include/boost/fusion/container/map/detail/map_forward_ctor.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp @@ -13,7 +13,7 @@ #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp new file mode 100644 index 00000000..b04ff322 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2001-2011 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) +==============================================================================*/ +#if !defined(FUSION_MAP_FORWARD_07212005_1105) +#define FUSION_MAP_FORWARD_07212005_1105 + +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map" FUSION_MAX_MAP_SIZE_STR "_fwd.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + struct map_tag; + struct map_iterator_tag; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename T, void_) + > + struct map; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp similarity index 62% rename from include/boost/fusion/container/map/detail/preprocessed/as_map.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp index 47eb0e4c..1d1be080 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/as_map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map10.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map10.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map20.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map20.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map30.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map30.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map40.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map40.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map50.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map50.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp similarity index 63% rename from include/boost/fusion/container/map/detail/preprocessed/map.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp index 93455c71..c6cd526a 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/map10.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map10.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map10_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map10_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map10_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map20.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map20.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map20_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map20_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map20_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map30.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map30.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map30_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map30_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map30_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map40.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map40.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map40_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map40_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map40_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map50.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map50.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map50_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map50_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map50_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp similarity index 62% rename from include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp index e478a6f8..2e66a457 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/value_at_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_at_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/value_at_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/value_at_impl.hpp diff --git a/include/boost/fusion/container/map/detail/value_of_data_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp similarity index 93% rename from include/boost/fusion/container/map/detail/value_of_data_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp index 28d21678..842791cc 100644 --- a/include/boost/fusion/container/map/detail/value_of_data_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP #define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP -#include +#include namespace boost { namespace fusion { namespace extension { diff --git a/include/boost/fusion/container/map/detail/value_of_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_of_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/value_of_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/value_of_impl.hpp diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index 5152e6e1..ad18955f 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -4,96 +4,9 @@ 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(FUSION_MAP_07212005_1106) -#define FUSION_MAP_07212005_1106 +#if !defined(FUSION_MAP_MAIN_07212005_1106) +#define FUSION_MAP_MAIN_07212005_1106 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map" FUSION_MAX_MAP_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct fusion_sequence_tag; - - template - struct map : sequence_base > - { - struct category : random_access_traversal_tag, associative_tag {}; - - typedef map_tag fusion_tag; - typedef fusion_sequence_tag tag; // this gets picked up by MPL - typedef mpl::false_ is_view; - - typedef vector< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> - storage_type; - - typedef typename storage_type::size size; - - map() - : data() {} - - template - map(Sequence const& rhs) - : data(rhs) {} - - #include - - template - map& - operator=(T const& rhs) - { - data = rhs; - return *this; - } - - storage_type& get_data() { return data; } - storage_type const& get_data() const { return data; } - - private: - - storage_type data; - }; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +#include #endif diff --git a/include/boost/fusion/container/map/map_fwd.hpp b/include/boost/fusion/container/map/map_fwd.hpp index 76c5eea7..1b7b1f43 100644 --- a/include/boost/fusion/container/map/map_fwd.hpp +++ b/include/boost/fusion/container/map/map_fwd.hpp @@ -4,49 +4,9 @@ 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(FUSION_MAP_FORWARD_07212005_1105) -#define FUSION_MAP_FORWARD_07212005_1105 +#if !defined(FUSION_MAP_FORWARD_MAIN_07212005_1105) +#define FUSION_MAP_FORWARD_MAIN_07212005_1105 -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map" FUSION_MAX_MAP_SIZE_STR "_fwd.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct map_tag; - struct map_iterator_tag; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_MAP_SIZE, typename T, void_) - > - struct map; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +#include #endif From 996f4152d2db107a5a7fd5751701a8c4b1fda15e Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 03:46:42 +0000 Subject: [PATCH 89/99] modern c++11 map implemented [SVN r82707] --- test/sequence/deque_iterator.cpp | 2 +- test/sequence/map.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/sequence/deque_iterator.cpp b/test/sequence/deque_iterator.cpp index f10f9b9e..10ce27f8 100644 --- a/test/sequence/deque_iterator.cpp +++ b/test/sequence/deque_iterator.cpp @@ -2,7 +2,7 @@ Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2006 Dan Marsden - Distributed under the Boost Software License, Version 1.0. (See accompanying + 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/map.cpp b/test/sequence/map.cpp index 265510f6..58497b44 100644 --- a/test/sequence/map.cpp +++ b/test/sequence/map.cpp @@ -79,12 +79,12 @@ main() BOOST_STATIC_ASSERT((boost::is_same::type>::type, char>::value)); BOOST_STATIC_ASSERT((boost::is_same::type>::type>::type, std::string>::value)); - //! Test random access interface. - pair a = at_c<0>(m); + // Test random access interface. + pair a = at_c<0>(m); (void) a; pair b = at_c<1>(m); } - //! iterators & random access interface. + // iterators & random access interface. { typedef pair, std::string> pair0; typedef pair, std::string> pair1; @@ -107,12 +107,11 @@ main() BOOST_TEST((deref(fusion::advance_c<4>(it0)) == deref(it4))); - //! Bi-directional + // Bi-directional BOOST_TEST((deref(fusion::prior(it4)) == deref(it3) )); BOOST_TEST((deref(fusion::prior(it3)) == deref(it2) )); BOOST_TEST((deref(fusion::prior(it2)) == deref(it1) )); BOOST_TEST((deref(fusion::prior(it1)) == deref(it0) )); - } { From 7b6cf39540824ec03ac4d826f1bddcccbca86237 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 03:49:34 +0000 Subject: [PATCH 90/99] modern c++11 map implemented + various tweaks [SVN r82708] --- .../boost/fusion/container/deque/deque.hpp | 11 +- .../container/deque/detail/cpp03/deque.hpp | 2 +- .../detail/cpp03/deque_keyed_values_call.hpp | 2 + .../generation/detail/pp_make_map.hpp | 132 ++++++++++++++ .../generation/detail/pp_map_tie.hpp | 136 +++++++++++++++ .../container/generation/make_deque.hpp | 2 - .../fusion/container/generation/make_map.hpp | 146 ++++------------ .../fusion/container/generation/map_tie.hpp | 136 +++------------ .../fusion/container/map/detail/at_impl.hpp | 55 ++++++ .../container/map/detail/at_key_impl.hpp | 58 ++++++ .../container/map/detail/begin_impl.hpp | 38 ++++ .../fusion/container/map/detail/end_impl.hpp | 38 ++++ .../fusion/container/map/detail/map_impl.hpp | 165 ++++++++++++++++++ .../map/detail/value_at_key_impl.hpp | 38 ++++ include/boost/fusion/container/map/map.hpp | 48 ++++- .../boost/fusion/container/map/map_fwd.hpp | 26 ++- .../fusion/container/map/map_iterator.hpp | 164 +++++++++++++++++ .../boost/fusion/iterator/basic_iterator.hpp | 2 +- 18 files changed, 965 insertions(+), 234 deletions(-) create mode 100644 include/boost/fusion/container/generation/detail/pp_make_map.hpp create mode 100644 include/boost/fusion/container/generation/detail/pp_map_tie.hpp create mode 100644 include/boost/fusion/container/map/detail/at_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/at_key_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/begin_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/end_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/map_impl.hpp create mode 100644 include/boost/fusion/container/map/detail/value_at_key_impl.hpp create mode 100644 include/boost/fusion/container/map/map_iterator.hpp diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 53623a9a..96b2978c 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -8,20 +8,17 @@ #if !defined(BOOST_FUSION_DEQUE_26112006_1649) #define BOOST_FUSION_DEQUE_26112006_1649 -#include +# include /////////////////////////////////////////////////////////////////////////////// -// With variadics, we will use the PP version +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # include #else -# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) -# define BOOST_FUSION_HAS_VARIADIC_DEQUE -# endif /////////////////////////////////////////////////////////////////////////////// -// C++11 variadic interface +// C++11 interface /////////////////////////////////////////////////////////////////////////////// #include #include diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp index 2e25a690..e1a547c6 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -164,7 +164,7 @@ namespace boost { namespace fusion { typename enable_if< mpl::and_< traits::is_sequence - , result_of::empty>>::type* /*dummy*/ = 0) + , result_of::empty > >::type* /*dummy*/ = 0) {} deque() {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp index 0b8543b6..7be11319 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp @@ -43,6 +43,7 @@ >::construct(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); } +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t)) { @@ -54,6 +55,7 @@ #endif >::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _))); } +#endif #undef N #endif diff --git a/include/boost/fusion/container/generation/detail/pp_make_map.hpp b/include/boost/fusion/container/generation/detail/pp_make_map.hpp new file mode 100644 index 00000000..9bea617f --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_map.hpp @@ -0,0 +1,132 @@ +/*============================================================================= + Copyright (c) 2001-2011 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_PP_MAKE_MAP_07222005_1247) +#define FUSION_PP_MAKE_MAP_07222005_1247 + +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename K, void_) + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename D, void_) + , typename Extra = void_ + > + struct make_map; + + template <> + struct make_map<> + { + typedef map<> type; + }; + } + + inline map<> + make_map() + { + return map<>(); + } + +#define BOOST_FUSION_PAIR(z, n, data) \ + fusion::pair< \ + BOOST_PP_CAT(K, n) \ + , typename detail::as_fusion_element::type> + +#define BOOST_FUSION_MAKE_PAIR(z, n, data) \ + fusion::make_pair(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_PAIR +#undef BOOST_FUSION_MAKE_PAIR + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_map + #undef TEXT +#else + struct make_map +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_map_tie.hpp b/include/boost/fusion/container/generation/detail/pp_map_tie.hpp new file mode 100644 index 00000000..e6287ba1 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_map_tie.hpp @@ -0,0 +1,136 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_PP_MAP_TIE_20060814_1116) +#define FUSION_PP_MAP_TIE_20060814_1116 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename K, void_) + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename D, void_) + , typename Extra = void_ + > + struct map_tie; + + template <> + struct map_tie<> + { + typedef map<> type; + }; + } + + inline map<> + map_tie() + { + return map<>(); + } + +#define BOOST_FUSION_TIED_PAIR(z, n, data) \ + fusion::pair< \ + BOOST_PP_CAT(K, n) \ + , typename add_reference::type> + +#define BOOST_FUSION_PAIR_TIE(z, n, data) \ + fusion::pair_tie(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_PAIR +#undef BOOST_FUSION_MAKE_PAIR + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + + struct map_tie + #undef TEXT +#else + struct map_tie +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/make_deque.hpp b/include/boost/fusion/container/generation/make_deque.hpp index f0178c5c..f13a379a 100644 --- a/include/boost/fusion/container/generation/make_deque.hpp +++ b/include/boost/fusion/container/generation/make_deque.hpp @@ -21,8 +21,6 @@ namespace boost { namespace fusion { - struct void_; - namespace result_of { template diff --git a/include/boost/fusion/container/generation/make_map.hpp b/include/boost/fusion/container/generation/make_map.hpp index 08938d4c..042574d2 100644 --- a/include/boost/fusion/container/generation/make_map.hpp +++ b/include/boost/fusion/container/generation/make_map.hpp @@ -1,132 +1,62 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2013 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING #if !defined(FUSION_MAKE_MAP_07222005_1247) #define FUSION_MAKE_MAP_07222005_1247 -#include -#include -#include -#include -#include #include + +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// #include #include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_SIZE_STR".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - namespace boost { namespace fusion { - struct void_; - namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename K, void_) - , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename D, void_) - , typename Extra = void_ - > - struct make_map; - - template <> - struct make_map<> + template + struct make_map { - typedef map<> type; + template + struct apply + { + typedef map< + fusion::pair< + Key + , typename detail::as_fusion_element::type + >...> + type; + }; }; } - inline map<> - make_map() + template + inline map< + fusion::pair< + Key + , typename detail::as_fusion_element::type + >...> + make_map(T const&... arg) { - return map<>(); + typedef map< + fusion::pair< + Key + , typename detail::as_fusion_element::type + >...> + result_type; + + return result_type(arg...); } - -#define BOOST_FUSION_PAIR(z, n, data) \ - fusion::pair< \ - BOOST_PP_CAT(K, n) \ - , typename detail::as_fusion_element::type> - -#define BOOST_FUSION_MAKE_PAIR(z, n, data) \ - fusion::make_pair(BOOST_PP_CAT(_, n)) \ - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_PAIR -#undef BOOST_FUSION_MAKE_PAIR - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + }} #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > -#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) - #define TEXT(z, n, text) , text - struct make_map - #undef TEXT -#else - struct make_map -#endif - { - typedef map type; - }; - } - - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > - inline map - make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _)) - { - return map( - BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/generation/map_tie.hpp b/include/boost/fusion/container/generation/map_tie.hpp index 4e8b3854..314df39d 100644 --- a/include/boost/fusion/container/generation/map_tie.hpp +++ b/include/boost/fusion/container/generation/map_tie.hpp @@ -1,136 +1,46 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + Copyright (c) 2001-2013 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAP_TIE_20060814_1116) -#define FUSION_MAP_TIE_20060814_1116 +#if !defined(FUSION_MAP_TIE_07222005_1247) +#define FUSION_MAP_TIE_07222005_1247 -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// +#include namespace boost { namespace fusion { - struct void_; - namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_MAP_SIZE, typename K, void_) - , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_MAP_SIZE, typename D, void_) - , typename Extra = void_ - > - struct map_tie; - - template <> - struct map_tie<> + template + struct map_tie { - typedef map<> type; + template + struct apply + { + typedef map...> type; + }; }; } - inline map<> - map_tie() + template + inline map...> + map_tie(T&... arg) { - return map<>(); + typedef map...> result_type; + return result_type(arg...); } - -#define BOOST_FUSION_TIED_PAIR(z, n, data) \ - fusion::pair< \ - BOOST_PP_CAT(K, n) \ - , typename add_reference::type> - -#define BOOST_FUSION_PAIR_TIE(z, n, data) \ - fusion::pair_tie(BOOST_PP_CAT(_, n)) \ - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_PAIR -#undef BOOST_FUSION_MAKE_PAIR - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + }} #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > -#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) - #define TEXT(z, n, text) , text - - struct map_tie - #undef TEXT -#else - struct map_tie -#endif - { - typedef map type; - }; - } - - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > - inline map - map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _)) - { - return map( - BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp new file mode 100644 index 00000000..176b1103 --- /dev/null +++ b/include/boost/fusion/container/map/detail/at_impl.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821 + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef + decltype(std::declval().get(N())) + type; + + static type + call(Sequence& m) + { + return m.get(N()); + } + }; + + template + struct apply + { + typedef + decltype(std::declval().get(N())) + type; + + static type + call(Sequence const& m) + { + return m.get(N()); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/at_key_impl.hpp b/include/boost/fusion/container/map/detail/at_key_impl.hpp new file mode 100644 index 00000000..1f08a47b --- /dev/null +++ b/include/boost/fusion/container/map/detail/at_key_impl.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_DETAIL_AT_KEY_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_AT_KEY_IMPL_02042013_0821 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct at_key_impl; + + template <> + struct at_key_impl + { + template + struct apply + { + typedef + decltype(std::declval().get(mpl::identity())) + type; + + static type + call(Sequence& m) + { + return m.get(mpl::identity()); + } + }; + + template + struct apply + { + typedef + decltype(std::declval().get(mpl::identity())) + type; + + static type + call(Sequence const& m) + { + return m.get(mpl::identity()); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/begin_impl.hpp b/include/boost/fusion/container/map/detail/begin_impl.hpp new file mode 100644 index 00000000..047683b8 --- /dev/null +++ b/include/boost/fusion/container/map/detail/begin_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_BEGIN_IMPL_02042013_0857) +#define BOOST_FUSION_MAP_BEGIN_IMPL_02042013_0857 + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct begin_impl; + + template<> + struct begin_impl + { + template + struct apply + { + typedef map_iterator type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/end_impl.hpp b/include/boost/fusion/container/map/detail/end_impl.hpp new file mode 100644 index 00000000..03c1fdd9 --- /dev/null +++ b/include/boost/fusion/container/map/detail/end_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_END_IMPL_02042013_0857) +#define BOOST_FUSION_MAP_END_IMPL_02042013_0857 + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct end_impl; + + template<> + struct end_impl + { + template + struct apply + { + typedef map_iterator type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/map_impl.hpp b/include/boost/fusion/container/map/detail/map_impl.hpp new file mode 100644 index 00000000..7f313f4c --- /dev/null +++ b/include/boost/fusion/container/map/detail/map_impl.hpp @@ -0,0 +1,165 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_IMPL_02032013_2233) +#define BOOST_FUSION_MAP_IMPL_02032013_2233 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct fusion_sequence_tag; +}} + +namespace boost { namespace fusion { namespace detail +{ + struct map_impl_from_iterator {}; + + template + struct map_impl; + + template + struct map_impl + { + typedef fusion_sequence_tag tag; + static int const index = index_; + static int const size = 0; + + map_impl() {} + + template + map_impl(Iterator const& iter, map_impl_from_iterator) + {} + + void get(); + void get_val(); + void get_key(); + }; + + template + struct map_impl : map_impl + { + typedef fusion_sequence_tag tag; + typedef map_impl rest_type; + + using rest_type::get; + using rest_type::get_val; + using rest_type::get_key; + + static int const index = index_; + static int const size = rest_type::size + 1; + + typedef Pair pair_type; + typedef typename Pair::first_type key_type; + typedef typename Pair::second_type value_type; + + map_impl() + : rest_type(), element() + {} + + map_impl(map_impl const& rhs) + : rest_type(rhs.get_base()), element(rhs.element) + {} + + map_impl(map_impl&& rhs) + : rest_type(std::forward(*static_cast(this))) + , element(std::forward(rhs.element)) + {} + + template + map_impl(map_impl const& rhs) + : rest_type(rhs.get_base()), element(rhs.element) + {} + + map_impl(typename detail::call_param::type element + , typename detail::call_param::type... rest) + : rest_type(rest...), element(element) + {} + + map_impl(Pair&& element, T&&... rest) + : rest_type(std::forward(rest)...) + , element(std::forward(element)) + {} + + template + map_impl(Iterator const& iter, map_impl_from_iterator fi) + : rest_type(fusion::next(iter), fi) + , element(*iter) + {} + + rest_type& get_base() + { + return *this; + } + + rest_type const& get_base() const + { + return *this; + } + + value_type get_val(mpl::identity); + pair_type get_val(mpl::int_); + value_type get_val(mpl::identity) const; + pair_type get_val(mpl::int_) const; + + key_type get_key(mpl::int_); + key_type get_key(mpl::int_) const; + + typename cref_result::type + get(mpl::identity) const + { + return element.second; + } + + typename ref_result::type + get(mpl::identity) + { + return element.second; + } + + typename cref_result::type + get(mpl::int_) const + { + return element; + } + + typename ref_result::type + get(mpl::int_) + { + return element; + } + + template + map_impl& operator=(map_impl const& rhs) + { + rest_type::operator=(rhs); + element = rhs.element; + return *this; + } + + map_impl& operator=(map_impl const& rhs) + { + rest_type::operator=(rhs); + element = rhs.element; + return *this; + } + + map_impl& operator=(map_impl&& rhs) + { + rest_type::operator=(std::forward(rhs)); + element = std::forward(rhs.element); + return *this; + } + + Pair element; + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/value_at_key_impl.hpp b/include/boost/fusion/container/map/detail/value_at_key_impl.hpp new file mode 100644 index 00000000..708e9913 --- /dev/null +++ b/include/boost/fusion/container/map/detail/value_at_key_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_DETAIL_VALUE_AT_KEY_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_KEY_IMPL_02042013_0821 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct value_at_key_impl; + + template <> + struct value_at_key_impl + { + template + struct apply + { + typedef + decltype(std::declval().get_val(mpl::identity())) + type; + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index ad18955f..106b6658 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -7,6 +7,52 @@ #if !defined(FUSION_MAP_MAIN_07212005_1106) #define FUSION_MAP_MAIN_07212005_1106 -#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + template + struct map : detail::map_impl<0, T...>, sequence_base> + { + typedef map_tag fusion_tag; + typedef detail::map_impl<0, T...> base_type; + + struct category : random_access_traversal_tag, associative_tag {}; + typedef mpl::int_ size; + typedef mpl::false_ is_view; + + map() {}; + + map(typename detail::call_param::type... element) + : base_type(element...) + {} + }; +}} #endif +#endif diff --git a/include/boost/fusion/container/map/map_fwd.hpp b/include/boost/fusion/container/map/map_fwd.hpp index 1b7b1f43..15df6329 100644 --- a/include/boost/fusion/container/map/map_fwd.hpp +++ b/include/boost/fusion/container/map/map_fwd.hpp @@ -7,6 +7,30 @@ #if !defined(FUSION_MAP_FORWARD_MAIN_07212005_1105) #define FUSION_MAP_FORWARD_MAIN_07212005_1105 -#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// With no decltype and variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +#if (defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) +# include +#else +# if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# define BOOST_FUSION_HAS_VARIADIC_MAP +# endif + +#include + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace fusion +{ + template + struct map; +}} #endif +#endif diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp new file mode 100644 index 00000000..7761fdba --- /dev/null +++ b/include/boost/fusion/container/map/map_iterator.hpp @@ -0,0 +1,164 @@ +/*============================================================================= + Copyright (c) 2005-2013 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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(BOOST_FUSION_MAP_ITERATOR_02042013_0835) +#define BOOST_FUSION_MAP_ITERATOR_02042013_0835 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + template + struct map_iterator + : iterator_facade< + map_iterator + , random_access_traversal_tag> + { + typedef Seq sequence; + typedef mpl::int_ index; + + map_iterator(Seq& seq) + : seq_(seq) + {} + + template + struct value_of + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_val(index())) + type; + }; + + template + struct value_of_data + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_val(index()).second) + type; + }; + + template + struct key_of + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_key(index())) + type; + }; + + template + struct deref + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get(index())) + type; + + static type + call(Iterator const& it) + { + return it.seq_.get(typename Iterator::index()); + } + }; + + template + struct deref_data + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get(index()).second) + type; + + static type + call(Iterator const& it) + { + return it.seq_.get(typename Iterator::index()).second; + } + }; + + //~ template + //~ struct deref_data + //~ { + //~ typedef typename Iterator::sequence sequence; + //~ typedef typename Iterator::index index; + //~ typedef + //~ decltype(std::declval().get(index())) + //~ type; + + //~ static type + //~ call(Iterator const& it) + //~ { + //~ return it.seq_.get(typename Iterator::index()); + //~ } + //~ }; + + template + struct advance + { + typedef typename Iterator::index index; + typedef typename Iterator::sequence sequence; + typedef map_iterator type; + + static type + call(Iterator const& i) + { + return type(i.seq_); + } + }; + + template + struct next + : advance > + {}; + + template + struct prior + : advance > + {}; + + template + struct distance : mpl::minus + { + typedef typename + mpl::minus< + typename I2::index, typename I1::index + >::type + type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + + template + struct equal_to + : mpl::equal_to + {}; + + Seq& seq_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + map_iterator& operator= (map_iterator const&); + }; + +}} + +#endif diff --git a/include/boost/fusion/iterator/basic_iterator.hpp b/include/boost/fusion/iterator/basic_iterator.hpp index 4327a8ce..995bdb10 100644 --- a/include/boost/fusion/iterator/basic_iterator.hpp +++ b/include/boost/fusion/iterator/basic_iterator.hpp @@ -39,7 +39,7 @@ namespace boost { namespace fusion template struct basic_iterator - : iterator_facade, Category> + : iterator_facade, Category> { typedef mpl::int_ index; typedef Seq seq_type; From 9c5d6bcc8cdfed64e8da78cc8d30293e07cf8a7a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 04:10:29 +0000 Subject: [PATCH 91/99] added pair < operator for case where key (first type) is the same. [SVN r82709] --- include/boost/fusion/support/pair.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index 11ad1ffe..642afdfa 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -105,6 +105,13 @@ namespace boost { namespace fusion { return l.second != r.second; } + + template + inline bool + operator<(pair const& l, pair const& r) + { + return l.second < r.second; + } }} #if defined (BOOST_MSVC) From aba201eb4e1042d9582a740179908746b61052d1 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 06:20:10 +0000 Subject: [PATCH 92/99] Added more map tests [SVN r82712] --- test/Jamfile | 3 + test/sequence/map_comparison.cpp | 68 +++++++++++++++ test/sequence/map_construction.cpp | 131 +++++++++++++++++++++++++++++ test/sequence/map_copy.cpp | 90 ++++++++++++++++++++ 4 files changed, 292 insertions(+) create mode 100644 test/sequence/map_comparison.cpp create mode 100644 test/sequence/map_construction.cpp create mode 100644 test/sequence/map_copy.cpp diff --git a/test/Jamfile b/test/Jamfile index f23b0c2a..5f6380d1 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -89,6 +89,9 @@ project [ run sequence/make_list.cpp : : : : ] [ run sequence/make_vector.cpp : : : : ] [ run sequence/map.cpp : : : : ] + [ run sequence/map_compare.cpp : : : : ] + [ run sequence/map_construction.cpp : : : : ] + [ run sequence/map_copy.cpp : : : : ] [ run sequence/map_tie.cpp : : : : ] [ run sequence/nview.cpp : : : : ] [ run sequence/reverse_view.cpp : : : : ] diff --git a/test/sequence/map_comparison.cpp b/test/sequence/map_comparison.cpp new file mode 100644 index 00000000..63f39515 --- /dev/null +++ b/test/sequence/map_comparison.cpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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 +#include + +struct key1 {}; +struct key2 {}; +struct key3 {}; + +void +equality_test() +{ + using namespace boost::fusion; + + map, pair > v1(5, 'a'); + map, pair > v2(5, 'a'); + BOOST_TEST(v1 == v2); + + map, pair > v3(5, 'b'); + map, pair > t4(2, 'a'); + BOOST_TEST(v1 != v3); + BOOST_TEST(v1 != t4); + BOOST_TEST(!(v1 != v2)); + + map, pair, pair > v5(5, 'a', true); + BOOST_TEST(v1 != v5); + BOOST_TEST(!(v1 == v5)); + BOOST_TEST(v5 != v1); + BOOST_TEST(!(v5 == v1)); +} + +void +ordering_test() +{ + using namespace boost::fusion; + + map, pair > v1(4, 3.3f); + map, pair > v2(5, 3.3f); + map, pair > v3(5, 4.4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + +#if defined(FUSION_TEST_FAIL) + map v5(5, 'a', true); + v1 >= v5; +#endif +} + +int +main() +{ + equality_test(); + ordering_test(); + return boost::report_errors(); +} diff --git a/test/sequence/map_construction.cpp b/test/sequence/map_construction.cpp new file mode 100644 index 00000000..ee308a13 --- /dev/null +++ b/test/sequence/map_construction.cpp @@ -0,0 +1,131 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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 +#include + +struct key1 {}; +struct key2 {}; +struct key3 {}; + +namespace test_detail +{ + // something to prevent warnings for unused variables + template void dummy(const T&) {} + + // no public default constructor + class foo + { + public: + + explicit foo(int v) : val(v) {} + + bool operator==(const foo& other) const + { + return val == other.val; + } + + private: + + foo() {} + int val; + }; + + // another class without a public default constructor + class no_def_constructor + { + no_def_constructor() {} + + public: + + no_def_constructor(std::string) {} + }; +} + +inline void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + nil empty; + + map<> empty0; + +#ifndef NO_CONSTRUCT_FROM_NIL + map<> empty1(empty); +#endif + + map > t1; + BOOST_TEST(at_c<0>(t1).second == int()); + + map > t2(5.5f); + BOOST_TEST(at_c<0>(t2).second > 5.4f && at_c<0>(t2).second < 5.6f); + + map > t3(foo(12)); + BOOST_TEST(at_c<0>(t3).second == foo(12)); + + map > t4(t2); + BOOST_TEST(at_c<0>(t4).second > 5.4 && at_c<0>(t4).second < 5.6); + + map, pair > t5; + BOOST_TEST(at_c<0>(t5).second == int()); + BOOST_TEST(at_c<1>(t5).second == float()); + + map, pair > t6(12, 5.5f); + BOOST_TEST(at_c<0>(t6).second == 12); + BOOST_TEST(at_c<1>(t6).second > 5.4f && at_c<1>(t6).second < 5.6f); + + map, pair > t7(t6); + BOOST_TEST(at_c<0>(t7).second == 12); + BOOST_TEST(at_c<1>(t7).second > 5.4f && at_c<1>(t7).second < 5.6f); + + map, pair > t8(t6); + BOOST_TEST(at_c<0>(t8).second == 12); + BOOST_TEST(at_c<1>(t8).second > 5.4f && at_c<1>(t8).second < 5.6f); + + dummy + ( + map< + pair, + pair, + pair > + ( + pair(std::string("Jaba")), // ok, since the default + pair(std::string("Daba")), // constructor is not used + pair(std::string("Doo")) + ) + ); + + dummy(map, pair >()); + dummy(map, pair >(1,3.14)); + +#if defined(FUSION_TEST_FAIL) + dummy(map >()); // should fail, no defaults for references + dummy(map >()); // likewise +#endif + + { + double dd = 5; + dummy(map >(pair(dd))); // ok + dummy(map >(pair(dd+3.14))); // ok, but dangerous + } + +#if defined(FUSION_TEST_FAIL) + dummy(map >(dd+3.14)); // should fail, + // temporary to non-const reference +#endif +} + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/test/sequence/map_copy.cpp b/test/sequence/map_copy.cpp new file mode 100644 index 00000000..b8218bdf --- /dev/null +++ b/test/sequence/map_copy.cpp @@ -0,0 +1,90 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct k1 {}; +struct k2 {}; +struct k3 {}; +struct k4 {}; + +namespace test_detail +{ + // classes with different kinds of conversions + class AA {}; + class BB : public AA {}; + struct CC { CC() {} CC(const BB&) {} }; + struct DD { operator CC() const { return CC(); }; }; +} + +boost::fusion::map< + boost::fusion::pair, + boost::fusion::pair, + boost::fusion::pair, + boost::fusion::pair +> +foo(int i) +{ + return boost::fusion::make_map(i, i+1, i+2, i+3); +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + map, pair > t1(4, 'a'); + map, pair > t2(5, 'b'); + t2 = t1; + BOOST_TEST(at_c<0>(t1).second == at_c<0>(t2).second); + BOOST_TEST(at_c<1>(t1).second == at_c<1>(t2).second); + + map, pair > t4(4, "a"); + map, pair > t3(2, std::string("a")); + t3 = t4; + BOOST_TEST((double)at_c<0>(t4).second == at_c<0>(t3).second); + BOOST_TEST(at_c<1>(t4).second == at_c<1>(t3).second); + + // testing copy and assignment with implicit conversions + // between elements testing tie + + map, pair, pair, pair > t; + map, pair, pair, pair > a(t); + a = t; + + int i; char c; double d; + map_tie(i, c, d) = make_map(1, 'a', 5.5); + + BOOST_TEST(i==1); + BOOST_TEST(c=='a'); + BOOST_TEST(d>5.4 && d<5.6); + + // returning a map with conversion + foo(2); +} + +int +main() +{ + test(); + return boost::report_errors(); +} + From 228401d8986041da20ec4b27bea4b0a940a3e32b Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 06:21:45 +0000 Subject: [PATCH 93/99] More map tests and more API features implemented + tweaks to affected components [SVN r82713] --- .../fusion/container/map/detail/cpp03/map.hpp | 9 ++++- .../fusion/container/map/detail/map_impl.hpp | 11 ++++++ include/boost/fusion/container/map/map.hpp | 39 +++++++++++++++++-- .../container/vector/detail/vector_n.hpp | 2 +- .../boost/fusion/container/vector/vector.hpp | 7 ++++ include/boost/fusion/support/pair.hpp | 6 +++ 6 files changed, 68 insertions(+), 6 deletions(-) diff --git a/include/boost/fusion/container/map/detail/cpp03/map.hpp b/include/boost/fusion/container/map/detail/cpp03/map.hpp index e0abd49c..74e4f599 100644 --- a/include/boost/fusion/container/map/detail/cpp03/map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/map.hpp @@ -74,13 +74,18 @@ namespace boost { namespace fusion #include template - map& - operator=(T const& rhs) + map& operator=(T const& rhs) { data = rhs; return *this; } + map& operator=(map const& rhs) + { + data = rhs.data; + return *this; + } + storage_type& get_data() { return data; } storage_type const& get_data() const { return data; } diff --git a/include/boost/fusion/container/map/detail/map_impl.hpp b/include/boost/fusion/container/map/detail/map_impl.hpp index 7f313f4c..cea25496 100644 --- a/include/boost/fusion/container/map/detail/map_impl.hpp +++ b/include/boost/fusion/container/map/detail/map_impl.hpp @@ -38,6 +38,10 @@ namespace boost { namespace fusion { namespace detail map_impl(Iterator const& iter, map_impl_from_iterator) {} + template + void assign(Iterator const& iter, map_impl_from_iterator) + {} + void get(); void get_val(); void get_key(); @@ -158,6 +162,13 @@ namespace boost { namespace fusion { namespace detail return *this; } + template + void assign(Iterator const& iter, map_impl_from_iterator fi) + { + rest_type::assign(fusion::next(iter), fi); + element = *iter; + } + Pair element; }; }}} diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index 106b6658..c74259ff 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -8,6 +8,7 @@ #define FUSION_MAP_MAIN_07212005_1106 #include +#include /////////////////////////////////////////////////////////////////////////////// // Without variadics, we will use the PP version @@ -29,9 +30,12 @@ #include #include #include +#include #include #include +#include + namespace boost { namespace fusion { struct map_tag; @@ -46,11 +50,40 @@ namespace boost { namespace fusion typedef mpl::int_ size; typedef mpl::false_ is_view; - map() {}; + map() {} - map(typename detail::call_param::type... element) - : base_type(element...) + template + map(Sequence const& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) {} + + template + map(First const& first, T_ const&... rest) + : base_type(first, rest...) + {} + + template + map(First& first, T_&... rest) + : base_type(first, rest...) + {} + + map& operator=(map const& rhs) + { + base_type::operator=(rhs.base()); + return *this; + } + + template + typename enable_if, map&>::type + operator=(Sequence const& seq) + { + base().assign(begin(seq), detail::map_impl_from_iterator()); + return *this; + } + + base_type& base() { return *this; } + base_type const& base() const { return *this; } }; }} diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 011a32df..2da75b77 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -204,7 +204,7 @@ BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N) const& vec) { - base_type::operator=(*this); + base_type::operator=(vec); return *this; } diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 9d5d8725..94a9c71a 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -140,6 +140,13 @@ namespace boost { namespace fusion return *this; } + vector& + operator=(vector const& rhs) + { + vec = rhs.vec; + return *this; + } + #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) vector& operator=(vector&& rhs) diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index 642afdfa..a5ba6ca4 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -42,6 +42,12 @@ namespace boost { namespace fusion return *this; } + pair& operator=(pair const& rhs) + { + second = rhs.second; + return *this; + } + typedef First first_type; typedef Second second_type; Second second; From 764a31e9f54b13afe3c6b6dd2865c7a27a76dc13 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 06:22:50 +0000 Subject: [PATCH 94/99] fixed typo [SVN r82714] --- test/Jamfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile b/test/Jamfile index 5f6380d1..45bbdd86 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -89,7 +89,7 @@ project [ run sequence/make_list.cpp : : : : ] [ run sequence/make_vector.cpp : : : : ] [ run sequence/map.cpp : : : : ] - [ run sequence/map_compare.cpp : : : : ] + [ run sequence/map_comparison.cpp : : : : ] [ run sequence/map_construction.cpp : : : : ] [ run sequence/map_copy.cpp : : : : ] [ run sequence/map_tie.cpp : : : : ] From 85119dbd210fab63fcb33d195cb34f64b86d14e9 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 09:52:52 +0000 Subject: [PATCH 95/99] added as_map fixed bug: wrong iterator category for map_iterator [SVN r82721] --- .../boost/fusion/container/deque/convert.hpp | 4 +- .../boost/fusion/container/map/convert.hpp | 47 +++++++++++- .../fusion/container/map/detail/at_impl.hpp | 10 ++- .../fusion/container/map/detail/build_map.hpp | 75 +++++++++++++++++++ .../fusion/container/map/detail/map_index.hpp | 19 +++++ include/boost/fusion/container/map/map.hpp | 6 ++ .../fusion/container/map/map_iterator.hpp | 20 +---- 7 files changed, 156 insertions(+), 25 deletions(-) create mode 100644 include/boost/fusion/container/map/detail/build_map.hpp create mode 100644 include/boost/fusion/container/map/detail/map_index.hpp diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 4f9eb7ce..0dc1dc0a 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -41,7 +41,7 @@ namespace boost { namespace fusion inline typename result_of::as_deque::type as_deque(Sequence& seq) { - typedef typename result_of::as_deque::gen gen; + typedef result_of::as_deque gen; return gen::call(fusion::begin(seq), fusion::end(seq)); } @@ -49,7 +49,7 @@ namespace boost { namespace fusion inline typename result_of::as_deque::type as_deque(Sequence const& seq) { - typedef typename result_of::as_deque::gen gen; + typedef result_of::as_deque gen; return gen::call(fusion::begin(seq), fusion::end(seq)); } }} diff --git a/include/boost/fusion/container/map/convert.hpp b/include/boost/fusion/container/map/convert.hpp index 5c93bbc0..b6d7285b 100644 --- a/include/boost/fusion/container/map/convert.hpp +++ b/include/boost/fusion/container/map/convert.hpp @@ -7,6 +7,51 @@ #if !defined(FUSION_CONVERT_MAIN_09232005_1340) #define FUSION_CONVERT_MAIN_09232005_1340 -#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include + +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic implementation +/////////////////////////////////////////////////////////////////////////////// +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_map : + detail::build_map< + typename result_of::begin::type + , typename result_of::end::type + > + { + }; + } + + template + inline typename result_of::as_map::type + as_map(Sequence& seq) + { + typedef result_of::as_map gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); + } + + template + inline typename result_of::as_map::type + as_map(Sequence const& seq) + { + typedef result_of::as_map gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); + } +}} #endif +#endif + diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp index 176b1103..3a16100b 100644 --- a/include/boost/fusion/container/map/detail/at_impl.hpp +++ b/include/boost/fusion/container/map/detail/at_impl.hpp @@ -24,28 +24,30 @@ namespace boost { namespace fusion template struct apply { + typedef mpl::int_ index; typedef - decltype(std::declval().get(N())) + decltype(std::declval().get(index())) type; static type call(Sequence& m) { - return m.get(N()); + return m.get(index()); } }; template struct apply { + typedef mpl::int_ index; typedef - decltype(std::declval().get(N())) + decltype(std::declval().get(index())) type; static type call(Sequence const& m) { - return m.get(N()); + return m.get(index()); } }; }; diff --git a/include/boost/fusion/container/map/detail/build_map.hpp b/include/boost/fusion/container/map/detail/build_map.hpp new file mode 100644 index 00000000..8170b276 --- /dev/null +++ b/include/boost/fusion/container/map/detail/build_map.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BUILD_MAP_02042013_1448) +#define BOOST_FUSION_BUILD_MAP_02042013_1448 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template ::value> + struct build_map; + + template + struct build_map + { + typedef map<> type; + static type + call(First const&, Last const&) + { + return type(); + } + }; + + template + struct push_front_map; + + template + struct push_front_map> + { + typedef map type; + + static type + call(T const& first, map const& rest) + { + return type(push_front(rest, first)); + } + }; + + template + struct build_map + { + typedef + build_map::type, Last> + next_build_map; + + typedef push_front_map< + typename result_of::value_of::type + , typename next_build_map::type> + push_front; + + typedef typename push_front::type type; + + static type + call(First const& f, Last const& l) + { + typename result_of::value_of::type v = *f; + return push_front::call( + v, next_build_map::call(fusion::next(f), l)); + } + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/map_index.hpp b/include/boost/fusion/container/map/detail/map_index.hpp new file mode 100644 index 00000000..9326cded --- /dev/null +++ b/include/boost/fusion/container/map/detail/map_index.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2005-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_INDEX_02032013_2233) +#define BOOST_FUSION_MAP_INDEX_02032013_2233 + +namespace boost { namespace fusion { namespace detail +{ + template + struct map_index + { + static int const value = N; + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index c74259ff..1ac36717 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -58,6 +58,12 @@ namespace boost { namespace fusion : base_type(begin(seq), detail::map_impl_from_iterator()) {} + template + map(Sequence& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) + {} + template map(First const& first, T_ const&... rest) : base_type(first, rest...) diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp index 7761fdba..a4ad80f0 100644 --- a/include/boost/fusion/container/map/map_iterator.hpp +++ b/include/boost/fusion/container/map/map_iterator.hpp @@ -20,7 +20,7 @@ namespace boost { namespace fusion struct map_iterator : iterator_facade< map_iterator - , random_access_traversal_tag> + , typename Seq::category> { typedef Seq sequence; typedef mpl::int_ index; @@ -91,22 +91,6 @@ namespace boost { namespace fusion } }; - //~ template - //~ struct deref_data - //~ { - //~ typedef typename Iterator::sequence sequence; - //~ typedef typename Iterator::index index; - //~ typedef - //~ decltype(std::declval().get(index())) - //~ type; - - //~ static type - //~ call(Iterator const& it) - //~ { - //~ return it.seq_.get(typename Iterator::index()); - //~ } - //~ }; - template struct advance { @@ -132,7 +116,7 @@ namespace boost { namespace fusion {}; template - struct distance : mpl::minus + struct distance { typedef typename mpl::minus< From 085c3c25ca6a057ff9470f8be0072e0078a616b8 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 11:52:18 +0000 Subject: [PATCH 96/99] more map tests (including move test) [SVN r82725] --- test/Jamfile | 3 + test/sequence/deque_move.cpp | 4 +- test/sequence/map_misc.cpp | 167 ++++++++++++++++++++++++++++++++++ test/sequence/map_move.cpp | 39 ++++++++ test/sequence/map_mutate.cpp | 69 ++++++++++++++ test/sequence/move.hpp | 4 +- test/sequence/vector_move.cpp | 4 +- 7 files changed, 286 insertions(+), 4 deletions(-) create mode 100644 test/sequence/map_misc.cpp create mode 100644 test/sequence/map_move.cpp create mode 100644 test/sequence/map_mutate.cpp diff --git a/test/Jamfile b/test/Jamfile index 45bbdd86..d4275f4b 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -92,6 +92,9 @@ project [ run sequence/map_comparison.cpp : : : : ] [ run sequence/map_construction.cpp : : : : ] [ run sequence/map_copy.cpp : : : : ] + [ run sequence/map_misc.cpp : : : : ] + [ run sequence/map_move.cpp : : : : ] + [ run sequence/map_mutate.cpp : : : : ] [ run sequence/map_tie.cpp : : : : ] [ run sequence/nview.cpp : : : : ] [ run sequence/reverse_view.cpp : : : : ] diff --git a/test/sequence/deque_move.cpp b/test/sequence/deque_move.cpp index d096f3b1..c1f126eb 100644 --- a/test/sequence/deque_move.cpp +++ b/test/sequence/deque_move.cpp @@ -13,7 +13,9 @@ #include -#define FUSION_SEQUENCE boost::fusion::deque +#define FUSION_SEQUENCE boost::fusion::deque> +#define FUSION_SEQUENCE2 boost::fusion::deque, x> + #include "move.hpp" #else diff --git a/test/sequence/map_misc.cpp b/test/sequence/map_misc.cpp new file mode 100644 index 00000000..256a16f4 --- /dev/null +++ b/test/sequence/map_misc.cpp @@ -0,0 +1,167 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2013 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct k1 {}; +struct k2 {}; +struct k3 {}; +struct k4 {}; + +template +struct is_same +{ +}; + +namespace fn = boost::fusion; + +struct test_intrinsics1 +{ + // test at, begin, end, next, prior, advance, size, deref, etc. + + typedef fn::map< + fn::pair, fn::pair, + fn::pair, fn::pair > + sequence; + + typedef boost::mpl::begin::type first; + typedef boost::mpl::next::type second; + typedef boost::mpl::next::type third; + typedef boost::mpl::next::type fourth; + typedef boost::mpl::end::type last; + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::at_c::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::front::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref< + boost::mpl::advance_c::type>::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::mpl::size::value == 4)); + BOOST_STATIC_ASSERT(!(boost::mpl::empty::value)); + BOOST_STATIC_ASSERT((boost::mpl::distance::value == 2)); + + typedef boost::mpl::prior::type fourth_; + typedef boost::mpl::prior::type third_; + typedef boost::mpl::prior::type second_; + typedef boost::mpl::prior::type first_; + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref::type, fn::pair >::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::back::type, fn::pair >::value)); + +}; + +void +test() +{ + using namespace boost::fusion; + + { // testing const sequences + + const map, pair > t1(5, 3.3f); + BOOST_TEST(at_c<0>(t1).second == 5); + BOOST_TEST(at_c<1>(t1).second == 3.3f); + } + + { // testing at works with MPL integral constants + const map, pair > t1(101, 'z'); + BOOST_TEST(boost::fusion::at >(t1).second == 101); + BOOST_TEST(boost::fusion::at >(t1).second == 'z'); + // explicitly try something other than mpl::int_ + BOOST_TEST((boost::fusion::at >(t1).second == 101)); + BOOST_TEST((boost::fusion::at >(t1).second == 'z')); + } + + { // testing size & empty + + typedef map, pair, pair > t1; + typedef map<> t2; + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 3); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size::value == 0); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty::value); + BOOST_STATIC_ASSERT(boost::fusion::result_of::empty::value); + } + + { // testing front & back + + typedef map, pair, pair > tup; + tup t(1, 2.2f, std::string("Kimpo")); + + BOOST_TEST(front(t).second == 1); + BOOST_TEST(back(t).second == "Kimpo"); + } + + { // testing is_sequence + + typedef map, pair, pair > t1; + typedef map<> t2; + typedef map > t3; + + BOOST_STATIC_ASSERT(traits::is_sequence::value); + BOOST_STATIC_ASSERT(traits::is_sequence::value); + BOOST_STATIC_ASSERT(traits::is_sequence::value); + BOOST_STATIC_ASSERT(!traits::is_sequence::value); + BOOST_STATIC_ASSERT(!traits::is_sequence::value); + } + + { // testing mpl compatibility + + // test an algorithm + typedef map, pair, pair > t1; + typedef boost::mpl::find >::type iter; + typedef boost::mpl::deref::type type; + BOOST_STATIC_ASSERT((boost::is_same >::value)); + } +} + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/map_move.cpp b/test/sequence/map_move.cpp new file mode 100644 index 00000000..77154406 --- /dev/null +++ b/test/sequence/map_move.cpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2012 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) +==============================================================================*/ +#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ + +#include + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +#include + +struct k1 {}; +struct k2 {}; + +#define FUSION_SEQUENCE boost::fusion::map>> + +#define FUSION_SEQUENCE2 boost::fusion::map< \ + boost::fusion::pair>, \ + boost::fusion::pair> + +#include "move.hpp" + +#else +#include +#endif + +int +main() +{ +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + test(); +#endif + + return boost::report_errors(); +} + diff --git a/test/sequence/map_mutate.cpp b/test/sequence/map_mutate.cpp new file mode 100644 index 00000000..afe78ad6 --- /dev/null +++ b/test/sequence/map_mutate.cpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 + + 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 +#include + +struct k1 {}; +struct k2 {}; +struct k3 {}; +struct k4 {}; + +namespace test_detail +{ + // no public default constructor + class foo + { + public: + + explicit foo(int v) : val(v) {} + + bool operator==(const foo& other) const + { + return val == other.val; + } + + private: + + foo() {} + int val; + }; +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + map< + pair, + pair, + pair, + pair + > t1(5, 12.2f, true, foo(4)); + + at_c<0>(t1).second = 6; + at_c<1>(t1).second = 2.2f; + at_c<2>(t1).second = false; + at_c<3>(t1).second = foo(5); + + BOOST_TEST(at_c<0>(t1).second == 6); + BOOST_TEST(at_c<1>(t1).second > 2.1f && at_c<1>(t1).second < 2.3f); + BOOST_TEST(at_c<2>(t1).second == false); + BOOST_TEST(at_c<3>(t1).second == foo(5)); +} + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/move.hpp b/test/sequence/move.hpp index 1ffeceee..febbc2bb 100644 --- a/test/sequence/move.hpp +++ b/test/sequence/move.hpp @@ -73,7 +73,7 @@ namespace test_detail return T(); } - typedef FUSION_SEQUENCE> return_type; + typedef FUSION_SEQUENCE return_type; return_type generate() @@ -84,7 +84,7 @@ namespace test_detail return return_type(); } - typedef FUSION_SEQUENCE, x> return_type2; + typedef FUSION_SEQUENCE2 return_type2; return_type2 generate2() diff --git a/test/sequence/vector_move.cpp b/test/sequence/vector_move.cpp index 23a82851..3f96d72a 100644 --- a/test/sequence/vector_move.cpp +++ b/test/sequence/vector_move.cpp @@ -12,7 +12,9 @@ #include -#define FUSION_SEQUENCE boost::fusion::vector +#define FUSION_SEQUENCE boost::fusion::vector> +#define FUSION_SEQUENCE2 boost::fusion::vector, x> + #include "move.hpp" #else From 9672fe538587efcb0f5485800d40de34d1fc12b4 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 11:52:58 +0000 Subject: [PATCH 97/99] map move supported + value_at_impl added [SVN r82726] --- .../container/map/detail/value_at_impl.hpp | 37 +++++++++++++++++++ include/boost/fusion/container/map/map.hpp | 30 ++++++++++++++- include/boost/fusion/support/pair.hpp | 25 +++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 include/boost/fusion/container/map/detail/value_at_impl.hpp diff --git a/include/boost/fusion/container/map/detail/value_at_impl.hpp b/include/boost/fusion/container/map/detail/value_at_impl.hpp new file mode 100644 index 00000000..75f2ddae --- /dev/null +++ b/include/boost/fusion/container/map/detail/value_at_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2013 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821 + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef mpl::int_ index; + typedef + decltype(std::declval().get_val(index())) + type; + }; + }; + } +}} + +#endif + diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index 1ac36717..327c2e53 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,14 @@ namespace boost { namespace fusion map() {} + map(map const& seq) + : base_type(seq.base()) + {} + + map(map&& seq) + : base_type(std::forward(seq)) + {} + template map(Sequence const& seq , typename enable_if>::type* /*dummy*/ = 0) @@ -64,22 +73,39 @@ namespace boost { namespace fusion : base_type(begin(seq), detail::map_impl_from_iterator()) {} + template + map(Sequence&& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) + {} + template map(First const& first, T_ const&... rest) : base_type(first, rest...) {} template - map(First& first, T_&... rest) - : base_type(first, rest...) + map(First&& first, T_&&... rest) + : base_type(std::forward(first), std::forward(rest)...) {} + //~ template + //~ map(First& first, T_&... rest) + //~ : base_type(first, rest...) + //~ {} + map& operator=(map const& rhs) { base_type::operator=(rhs.base()); return *this; } + map& operator=(map&& rhs) + { + base_type::operator=(std::forward(rhs.base())); + return *this; + } + template typename enable_if, map&>::type operator=(Sequence const& seq) diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index a5ba6ca4..0c04f379 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -28,9 +28,26 @@ namespace boost { namespace fusion pair() : second() {} + pair(pair const& rhs) + : second(rhs.second) {} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + pair(pair&& rhs) + : second(std::forward(rhs.second)) {} +#endif + pair(typename detail::call_param::type val) : second(val) {} +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + + template + pair(Second2&& val + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) : second(std::forward(val)) {} + +#endif + template pair(pair const& rhs) : second(rhs.second) {} @@ -48,6 +65,14 @@ namespace boost { namespace fusion return *this; } +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + pair& operator=(pair&& rhs) + { + second = std::forward(rhs.second); + return *this; + } +#endif + typedef First first_type; typedef Second second_type; Second second; From fb3bd4cea85ed256c4e5075783dbca55decbb0f0 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 11:54:59 +0000 Subject: [PATCH 98/99] minor cleanup [SVN r82727] --- include/boost/fusion/container/map/map.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index 327c2e53..95b051ca 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -89,11 +89,6 @@ namespace boost { namespace fusion : base_type(std::forward(first), std::forward(rest)...) {} - //~ template - //~ map(First& first, T_&... rest) - //~ : base_type(first, rest...) - //~ {} - map& operator=(map const& rhs) { base_type::operator=(rhs.base()); From d354c5183bb6a0cbaaa3da2a767813843f71fb50 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 4 Feb 2013 12:15:02 +0000 Subject: [PATCH 99/99] Tweaks for MSVC. MSVC version of map is not yet move enables so it is failing the move test [SVN r82728] --- include/boost/fusion/container/vector/detail/vector_n.hpp | 4 +++- include/boost/fusion/support/pair.hpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 2da75b77..1354ff41 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -64,7 +64,9 @@ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) + BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _) + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_ARG_FWD, _) {} #endif diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index 0c04f379..9c54e524 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #if defined (BOOST_MSVC) # pragma warning(push)