From a77599ed49ac217c817a0cf7744693a5b4734162 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 20 Oct 2007 11:01:50 +0000 Subject: [PATCH] refactoring for v2.1 [SVN r40208] --- .../fusion/algorithm/transformation/erase.hpp | 15 ++++++++------- .../fusion/algorithm/transformation/insert.hpp | 9 +++++---- .../algorithm/transformation/insert_range.hpp | 5 +++-- .../fusion/iterator/mpl/convert_iterator.hpp | 6 ++++-- .../view/ext_/segmented_iterator_range.hpp | 2 ++ .../view/filter_view/filter_view_iterator.hpp | 3 ++- .../view/iterator_range/iterator_range.hpp | 7 ++++--- .../view/joint_view/joint_view_iterator.hpp | 3 ++- .../repetitive_view_iterator.hpp | 3 ++- .../view/reverse_view/reverse_view_iterator.hpp | 3 ++- .../transform_view/transform_view_iterator.hpp | 3 ++- .../zip_view/detail/strictest_traversal.hpp | 8 ++++---- .../view/zip_view/detail/value_of_impl.hpp | 6 +++--- .../boost/fusion/support/deduce_sequence.hpp | 6 +++--- .../fusion/support/detail/compiler_config.hpp | 17 ----------------- include/boost/fusion/support/iterator_base.hpp | 4 +--- include/boost/fusion/support/pair.hpp | 13 ++++++------- include/boost/fusion/support/sequence_base.hpp | 5 ++--- include/boost/fusion/support/tag_of.hpp | 12 ++++++------ include/boost/fusion/support/tag_of_fwd.hpp | 6 +++--- include/boost/fusion/support/void.hpp | 9 ++++++++- 21 files changed, 72 insertions(+), 73 deletions(-) delete mode 100644 include/boost/fusion/support/detail/compiler_config.hpp diff --git a/include/boost/fusion/algorithm/transformation/erase.hpp b/include/boost/fusion/algorithm/transformation/erase.hpp index 9e78da27..5cd8069a 100644 --- a/include/boost/fusion/algorithm/transformation/erase.hpp +++ b/include/boost/fusion/algorithm/transformation/erase.hpp @@ -1,20 +1,21 @@ /*============================================================================= Copyright (c) 2001-2006 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_ERASE_07232005_0534) #define FUSION_ERASE_07232005_0534 +#include +#include #include #include #include #include #include #include -#include -#include +#include namespace boost { namespace fusion { @@ -25,7 +26,7 @@ namespace boost { namespace fusion { typedef typename result_of::end::type seq_last_type; typedef typename convert_iterator::type first_type; - typedef typename + typedef typename mpl::if_< result_of::equal_to , first_type @@ -33,19 +34,19 @@ namespace boost { namespace fusion >::type type; - static type + static type call(First const& first, mpl::false_) { return fusion::next(convert_iterator::call(first)); } - static type + static type call(First const& first, mpl::true_) { return convert_iterator::call(first); } - static type + static type call(First const& first) { return call(first, result_of::equal_to()); diff --git a/include/boost/fusion/algorithm/transformation/insert.hpp b/include/boost/fusion/algorithm/transformation/insert.hpp index ebe06f14..9894062c 100644 --- a/include/boost/fusion/algorithm/transformation/insert.hpp +++ b/include/boost/fusion/algorithm/transformation/insert.hpp @@ -1,20 +1,21 @@ /*============================================================================= Copyright (c) 2001-2006 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_INSERT_07222005_0730) #define FUSION_INSERT_07222005_0730 +#include +#include #include #include #include #include -#include #include #include -#include +#include namespace boost { namespace fusion { @@ -42,7 +43,7 @@ namespace boost { namespace fusion insert(Sequence const& seq, Position const& pos, T const& x) { typedef result_of::insert< - Sequence const, Position, T> + Sequence const, Position, T> result_of; typedef typename result_of::left_type left_type; typedef typename result_of::right_type right_type; diff --git a/include/boost/fusion/algorithm/transformation/insert_range.hpp b/include/boost/fusion/algorithm/transformation/insert_range.hpp index 4db840aa..93251e55 100644 --- a/include/boost/fusion/algorithm/transformation/insert_range.hpp +++ b/include/boost/fusion/algorithm/transformation/insert_range.hpp @@ -1,19 +1,20 @@ /*============================================================================= Copyright (c) 2001-2006 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_INSERT_RANGE_009172005_1147) #define FUSION_INSERT_RANGE_009172005_1147 +#include #include #include #include #include #include #include -#include +#include namespace boost { namespace fusion { diff --git a/include/boost/fusion/iterator/mpl/convert_iterator.hpp b/include/boost/fusion/iterator/mpl/convert_iterator.hpp index fc2efacf..5716ce4e 100644 --- a/include/boost/fusion/iterator/mpl/convert_iterator.hpp +++ b/include/boost/fusion/iterator/mpl/convert_iterator.hpp @@ -1,19 +1,21 @@ /*============================================================================= Copyright (c) 2001-2006 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_CONVERT_ITERATOR_05062005_1218) #define FUSION_CONVERT_ITERATOR_05062005_1218 #include -#include #include #include namespace boost { namespace fusion { + template + struct mpl_iterator; // forward declaration + // Test T. If it is a fusion iterator, return a reference to it. // else, assume it is an mpl iterator. diff --git a/include/boost/fusion/sequence/view/ext_/segmented_iterator_range.hpp b/include/boost/fusion/sequence/view/ext_/segmented_iterator_range.hpp index 7bab8789..df06c125 100755 --- a/include/boost/fusion/sequence/view/ext_/segmented_iterator_range.hpp +++ b/include/boost/fusion/sequence/view/ext_/segmented_iterator_range.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include namespace boost { namespace fusion { diff --git a/include/boost/fusion/sequence/view/filter_view/filter_view_iterator.hpp b/include/boost/fusion/sequence/view/filter_view/filter_view_iterator.hpp index aaf1d6e0..8af0776c 100644 --- a/include/boost/fusion/sequence/view/filter_view/filter_view_iterator.hpp +++ b/include/boost/fusion/sequence/view/filter_view/filter_view_iterator.hpp @@ -1,13 +1,14 @@ /*============================================================================= Copyright (c) 2001-2006 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_FILTER_VIEW_ITERATOR_05062005_0849) #define FUSION_FILTER_VIEW_ITERATOR_05062005_0849 #include +#include #include #include #include diff --git a/include/boost/fusion/sequence/view/iterator_range/iterator_range.hpp b/include/boost/fusion/sequence/view/iterator_range/iterator_range.hpp index dee6c00a..8b0a3793 100644 --- a/include/boost/fusion/sequence/view/iterator_range/iterator_range.hpp +++ b/include/boost/fusion/sequence/view/iterator_range/iterator_range.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 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_ITERATOR_RANGE_05062005_1224) @@ -10,12 +10,13 @@ #include #include #include +#include +#include #include #include #include #include -#include -#include +#include #include namespace boost { namespace fusion diff --git a/include/boost/fusion/sequence/view/joint_view/joint_view_iterator.hpp b/include/boost/fusion/sequence/view/joint_view/joint_view_iterator.hpp index 0bdfae07..294116f1 100644 --- a/include/boost/fusion/sequence/view/joint_view/joint_view_iterator.hpp +++ b/include/boost/fusion/sequence/view/joint_view/joint_view_iterator.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 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_JOINT_VIEW_ITERATOR_07162005_0140) @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/fusion/sequence/view/repetitive_view/repetitive_view_iterator.hpp b/include/boost/fusion/sequence/view/repetitive_view/repetitive_view_iterator.hpp index 6b2a9a5e..7b9b17ce 100644 --- a/include/boost/fusion/sequence/view/repetitive_view/repetitive_view_iterator.hpp +++ b/include/boost/fusion/sequence/view/repetitive_view/repetitive_view_iterator.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace boost { namespace fusion { struct repetitive_view_iterator_tag; - template::type> struct repetitive_view_iterator : iterator_base< repetitive_view_iterator > diff --git a/include/boost/fusion/sequence/view/reverse_view/reverse_view_iterator.hpp b/include/boost/fusion/sequence/view/reverse_view/reverse_view_iterator.hpp index 5f44b8b5..54f75070 100644 --- a/include/boost/fusion/sequence/view/reverse_view/reverse_view_iterator.hpp +++ b/include/boost/fusion/sequence/view/reverse_view/reverse_view_iterator.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 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_REVERSE_VIEW_ITERATOR_07202005_0835) @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/fusion/sequence/view/transform_view/transform_view_iterator.hpp b/include/boost/fusion/sequence/view/transform_view/transform_view_iterator.hpp index 4d63f7e0..49eb0c42 100644 --- a/include/boost/fusion/sequence/view/transform_view/transform_view_iterator.hpp +++ b/include/boost/fusion/sequence/view/transform_view/transform_view_iterator.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 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_TRANSFORM_VIEW_ITERATOR_07162005_1033) @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/fusion/sequence/view/zip_view/detail/strictest_traversal.hpp b/include/boost/fusion/sequence/view/zip_view/detail/strictest_traversal.hpp index 60abb57c..ae276839 100644 --- a/include/boost/fusion/sequence/view/zip_view/detail/strictest_traversal.hpp +++ b/include/boost/fusion/sequence/view/zip_view/detail/strictest_traversal.hpp @@ -2,7 +2,7 @@ Copyright (c) 2001-2006 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) ==============================================================================*/ #if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101) @@ -16,8 +16,8 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct forward_traversal_tag; struct bidirectional_traversal_tag; struct random_access_traversal_tag; @@ -58,7 +58,7 @@ namespace boost { namespace fusion { template struct strictest_traversal : result_of::fold< - Sequence, fusion::random_access_traversal_tag, + Sequence, fusion::random_access_traversal_tag, strictest_traversal_impl> {}; diff --git a/include/boost/fusion/sequence/view/zip_view/detail/value_of_impl.hpp b/include/boost/fusion/sequence/view/zip_view/detail/value_of_impl.hpp index 9ea84a17..531d2350 100644 --- a/include/boost/fusion/sequence/view/zip_view/detail/value_of_impl.hpp +++ b/include/boost/fusion/sequence/view/zip_view/detail/value_of_impl.hpp @@ -2,7 +2,7 @@ Copyright (c) 2001-2006 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) ==============================================================================*/ #if !defined(FUSION_VALUE_OF_IMPL_20060124_2147) @@ -17,8 +17,8 @@ #include #include -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ struct zip_view_iterator_tag; namespace detail diff --git a/include/boost/fusion/support/deduce_sequence.hpp b/include/boost/fusion/support/deduce_sequence.hpp index 41ecbd1b..3dbe480b 100644 --- a/include/boost/fusion/support/deduce_sequence.hpp +++ b/include/boost/fusion/support/deduce_sequence.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2007 Tobias Schwinger - - Use modification and distribution are subject to the Boost Software + + Use modification and distribution are 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). ==============================================================================*/ @@ -29,7 +29,7 @@ namespace boost { namespace fusion { namespace traits }; } - // We cannot use fusion::transform_view here as result_of looses cv qualifiers + // We cannot use fusion::transform_view here as result_of loses cv qualifiers // on built in types template struct deduce_sequence diff --git a/include/boost/fusion/support/detail/compiler_config.hpp b/include/boost/fusion/support/detail/compiler_config.hpp deleted file mode 100644 index 3859ef78..00000000 --- a/include/boost/fusion/support/detail/compiler_config.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2006 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_COMPILER_CONFIG_01052006_1200) -#define FUSION_COMPILER_CONFIG_01052006_1200 - -#include -#include - -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) -#pragma warning(disable : 4512 4244 4100 4305) -#endif - -#endif diff --git a/include/boost/fusion/support/iterator_base.hpp b/include/boost/fusion/support/iterator_base.hpp index 39d05c40..2f909b2e 100644 --- a/include/boost/fusion/support/iterator_base.hpp +++ b/include/boost/fusion/support/iterator_base.hpp @@ -1,14 +1,12 @@ /*============================================================================= Copyright (c) 2001-2006 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_ITERATOR_BASE_05042005_1008) #define FUSION_ITERATOR_BASE_05042005_1008 -#include - namespace boost { namespace fusion { struct iterator_root {}; diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index 67758071..cf285714 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -2,13 +2,12 @@ Copyright (c) 2005 Joel de Guzman Copyright (c) 2006 Tobias Schwinger - 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_PAIR_07222005_1203) #define FUSION_PAIR_07222005_1203 -#include #include #include @@ -23,7 +22,7 @@ namespace boost { namespace fusion pair(typename detail::call_param::type val) : second(val) {} - + template pair(pair const& rhs) : second(rhs.second) {} @@ -45,7 +44,7 @@ namespace boost { namespace fusion template struct make_pair { - typedef fusion::pair::type> type; }; @@ -84,16 +83,16 @@ namespace boost { namespace fusion is >> p.second; return is; } - + template - inline bool + inline bool operator==(pair const& l, pair const& r) { return l.second == r.second; } template - inline bool + inline bool operator!=(pair const& l, pair const& r) { return l.second != r.second; diff --git a/include/boost/fusion/support/sequence_base.hpp b/include/boost/fusion/support/sequence_base.hpp index 1a82848d..1d436ef1 100644 --- a/include/boost/fusion/support/sequence_base.hpp +++ b/include/boost/fusion/support/sequence_base.hpp @@ -2,13 +2,12 @@ Copyright (c) 2001-2006 Joel de Guzman Copyright (c) 2007 Tobias Schwinger - 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_SEQUENCE_BASE_04182005_0737) #define FUSION_SEQUENCE_BASE_04182005_0737 -#include #include namespace boost { namespace fusion @@ -37,7 +36,7 @@ namespace boost { namespace fusion namespace boost { namespace mpl { // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence - // is not an MPL sequence by returning mpl::void_. + // is not an MPL sequence by returning mpl::void_. // In other words: Fusion Sequences are always MPL Sequences, but they can // be incompletely defined. template<> struct begin_impl< boost::fusion::fusion_sequence_tag >; diff --git a/include/boost/fusion/support/tag_of.hpp b/include/boost/fusion/support/tag_of.hpp index a1ccf12d..209ceeff 100644 --- a/include/boost/fusion/support/tag_of.hpp +++ b/include/boost/fusion/support/tag_of.hpp @@ -1,17 +1,17 @@ /*============================================================================= Copyright (c) 2001-2006 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_TAG_OF_09232005_0845) #define FUSION_TAG_OF_09232005_0845 +#include #include #include #include #include -#include #include #include #include @@ -26,13 +26,13 @@ namespace boost namespace tuples { struct null_type; - + template < - class T0, class T1, class T2, class T3, class T4, + class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 > class tuple; - + template struct cons; } @@ -53,7 +53,7 @@ namespace boost { namespace fusion {}; template < - class T0, class T1, class T2, class T3, class T4, + class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9 > struct is_specialized > diff --git a/include/boost/fusion/support/tag_of_fwd.hpp b/include/boost/fusion/support/tag_of_fwd.hpp index 053cacaf..e6c883d5 100644 --- a/include/boost/fusion/support/tag_of_fwd.hpp +++ b/include/boost/fusion/support/tag_of_fwd.hpp @@ -2,14 +2,14 @@ Copyright (c) 2001-2006 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_TAG_OF_FWD_31122005_1445) #define BOOST_FUSION_TAG_OF_FWD_31122005_1445 -namespace boost { namespace fusion { - +namespace boost { namespace fusion +{ namespace traits { template diff --git a/include/boost/fusion/support/void.hpp b/include/boost/fusion/support/void.hpp index 63275b11..7dd11e5c 100644 --- a/include/boost/fusion/support/void.hpp +++ b/include/boost/fusion/support/void.hpp @@ -1,7 +1,14 @@ +/*============================================================================= + Copyright (c) 2001-2006 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_SUPPORT_VOID_20070706_2125) #define BOOST_FUSION_SUPPORT_VOID_20070706_2125 -namespace boost { namespace fusion { +namespace boost { namespace fusion +{ struct void_ {}; }}