diff --git a/include/boost/fusion/adapted/array.hpp b/include/boost/fusion/adapted/array.hpp index 2be9d4ba..cb828090 100644 --- a/include/boost/fusion/adapted/array.hpp +++ b/include/boost/fusion/adapted/array.hpp @@ -1,6 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt 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) @@ -8,15 +9,19 @@ #if !defined(BOOST_FUSION_ARRAY_27122005_1035) #define BOOST_FUSION_ARRAY_27122005_1035 -#include +//For backwards compatibility +#include + #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif diff --git a/include/boost/fusion/adapted/boost_array.hpp b/include/boost/fusion/adapted/boost_array.hpp new file mode 100644 index 00000000..835135b9 --- /dev/null +++ b/include/boost/fusion/adapted/boost_array.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 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_BOOST_ARRAY_27122005_1035) +#define BOOST_FUSION_BOOST_ARRAY_27122005_1035 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/boost/fusion/include/boost_array.hpp b/include/boost/fusion/include/boost_array.hpp new file mode 100644 index 00000000..d2c2bed8 --- /dev/null +++ b/include/boost/fusion/include/boost_array.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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_BOOST_ARRAY) +#define FUSION_INCLUDE_BOOST_ARRAY + +#include + +#endif diff --git a/include/boost/fusion/iterator/advance.hpp b/include/boost/fusion/iterator/advance.hpp index 2cbafede..56ed60be 100644 --- a/include/boost/fusion/iterator/advance.hpp +++ b/include/boost/fusion/iterator/advance.hpp @@ -21,7 +21,7 @@ namespace boost { namespace fusion // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -51,7 +51,7 @@ namespace boost { namespace fusion }; template <> - struct advance_impl; + struct advance_impl; template <> struct advance_impl; diff --git a/include/boost/fusion/iterator/basic_iterator.hpp b/include/boost/fusion/iterator/basic_iterator.hpp index 80c7f646..33c514f3 100644 --- a/include/boost/fusion/iterator/basic_iterator.hpp +++ b/include/boost/fusion/iterator/basic_iterator.hpp @@ -95,11 +95,16 @@ namespace boost { namespace fusion template struct distance - : mpl::minus< - typename It2::index - , typename It1::index - > - {}; + { + typedef mpl::minus type; + + static + type + call(It1 const&, It2 const&) + { + return type(); + } + }; template struct equal_to diff --git a/include/boost/fusion/iterator/deref.hpp b/include/boost/fusion/iterator/deref.hpp index 0e6f54d2..2d5f04ee 100644 --- a/include/boost/fusion/iterator/deref.hpp +++ b/include/boost/fusion/iterator/deref.hpp @@ -14,7 +14,7 @@ namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -35,7 +35,7 @@ namespace boost { namespace fusion }; template <> - struct deref_impl; + struct deref_impl; template <> struct deref_impl; diff --git a/include/boost/fusion/iterator/distance.hpp b/include/boost/fusion/iterator/distance.hpp index 44fc4292..0cfa414d 100644 --- a/include/boost/fusion/iterator/distance.hpp +++ b/include/boost/fusion/iterator/distance.hpp @@ -22,7 +22,7 @@ namespace boost { namespace fusion // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -48,7 +48,7 @@ namespace boost { namespace fusion }; template <> - struct distance_impl; + struct distance_impl; template <> struct distance_impl; @@ -61,8 +61,8 @@ namespace boost { namespace fusion { template struct distance - : extension::distance_impl::type>:: - template apply + : extension::distance_impl::type>:: + template apply { typedef typename extension::distance_impl::type>:: template apply::type distance_application; diff --git a/include/boost/fusion/iterator/equal_to.hpp b/include/boost/fusion/iterator/equal_to.hpp index 2db27675..a0387417 100644 --- a/include/boost/fusion/iterator/equal_to.hpp +++ b/include/boost/fusion/iterator/equal_to.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -42,7 +42,7 @@ namespace boost { namespace fusion }; template <> - struct equal_to_impl; + struct equal_to_impl; template <> struct equal_to_impl; diff --git a/include/boost/fusion/iterator/next.hpp b/include/boost/fusion/iterator/next.hpp index 9070a9e2..d2cf63dd 100644 --- a/include/boost/fusion/iterator/next.hpp +++ b/include/boost/fusion/iterator/next.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -34,7 +34,7 @@ namespace boost { namespace fusion }; template <> - struct next_impl; + struct next_impl; template <> struct next_impl; diff --git a/include/boost/fusion/iterator/prior.hpp b/include/boost/fusion/iterator/prior.hpp index 9a261039..a8b9fd64 100644 --- a/include/boost/fusion/iterator/prior.hpp +++ b/include/boost/fusion/iterator/prior.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -34,7 +34,7 @@ namespace boost { namespace fusion }; template <> - struct prior_impl; + struct prior_impl; template <> struct prior_impl; diff --git a/include/boost/fusion/iterator/value_of.hpp b/include/boost/fusion/iterator/value_of.hpp index 808c6593..478e4d2b 100644 --- a/include/boost/fusion/iterator/value_of.hpp +++ b/include/boost/fusion/iterator/value_of.hpp @@ -14,7 +14,7 @@ namespace boost { namespace fusion { // Special tags: struct iterator_facade_tag; // iterator facade tag - struct array_iterator_tag; // boost::array iterator tag + struct boost_array_iterator_tag; // boost::array iterator tag struct mpl_iterator_tag; // mpl sequence iterator tag struct std_pair_iterator_tag; // std::pair iterator tag @@ -35,7 +35,7 @@ namespace boost { namespace fusion }; template <> - struct value_of_impl; + struct value_of_impl; template <> struct value_of_impl; diff --git a/include/boost/fusion/sequence/intrinsic/at.hpp b/include/boost/fusion/sequence/intrinsic/at.hpp index bcb67990..9ccbfc64 100644 --- a/include/boost/fusion/sequence/intrinsic/at.hpp +++ b/include/boost/fusion/sequence/intrinsic/at.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -41,7 +41,7 @@ namespace boost { namespace fusion struct at_impl; template <> - struct at_impl; + struct at_impl; template <> struct at_impl; diff --git a/include/boost/fusion/sequence/intrinsic/at_key.hpp b/include/boost/fusion/sequence/intrinsic/at_key.hpp index 4c860bc1..30fefe01 100644 --- a/include/boost/fusion/sequence/intrinsic/at_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/at_key.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -52,7 +52,7 @@ namespace boost { namespace fusion }; template <> - struct at_key_impl; + struct at_key_impl; template <> struct at_key_impl; diff --git a/include/boost/fusion/sequence/intrinsic/begin.hpp b/include/boost/fusion/sequence/intrinsic/begin.hpp index 715ef9e1..5dbe0c40 100644 --- a/include/boost/fusion/sequence/intrinsic/begin.hpp +++ b/include/boost/fusion/sequence/intrinsic/begin.hpp @@ -14,7 +14,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; // iterator facade tag struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -38,7 +38,7 @@ namespace boost { namespace fusion struct begin_impl; template <> - struct begin_impl; + struct begin_impl; template <> struct begin_impl; diff --git a/include/boost/fusion/sequence/intrinsic/end.hpp b/include/boost/fusion/sequence/intrinsic/end.hpp index 04232f12..98a554e3 100644 --- a/include/boost/fusion/sequence/intrinsic/end.hpp +++ b/include/boost/fusion/sequence/intrinsic/end.hpp @@ -14,7 +14,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -38,7 +38,7 @@ namespace boost { namespace fusion struct end_impl; template <> - struct end_impl; + struct end_impl; template <> struct end_impl; diff --git a/include/boost/fusion/sequence/intrinsic/has_key.hpp b/include/boost/fusion/sequence/intrinsic/has_key.hpp index 68582059..f254eb1e 100644 --- a/include/boost/fusion/sequence/intrinsic/has_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/has_key.hpp @@ -19,7 +19,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -47,7 +47,7 @@ namespace boost { namespace fusion }; template <> - struct has_key_impl; + struct has_key_impl; template <> struct has_key_impl; diff --git a/include/boost/fusion/sequence/intrinsic/size.hpp b/include/boost/fusion/sequence/intrinsic/size.hpp index 74e3f53a..2a3cb7f8 100644 --- a/include/boost/fusion/sequence/intrinsic/size.hpp +++ b/include/boost/fusion/sequence/intrinsic/size.hpp @@ -15,7 +15,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -39,7 +39,7 @@ namespace boost { namespace fusion struct size_impl; template <> - struct size_impl; + struct size_impl; template <> struct size_impl; diff --git a/include/boost/fusion/sequence/intrinsic/value_at.hpp b/include/boost/fusion/sequence/intrinsic/value_at.hpp index d0868155..01cdc9d5 100644 --- a/include/boost/fusion/sequence/intrinsic/value_at.hpp +++ b/include/boost/fusion/sequence/intrinsic/value_at.hpp @@ -15,7 +15,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -39,7 +39,7 @@ namespace boost { namespace fusion struct value_at_impl; template <> - struct value_at_impl; + struct value_at_impl; template <> struct value_at_impl; diff --git a/include/boost/fusion/sequence/intrinsic/value_at_key.hpp b/include/boost/fusion/sequence/intrinsic/value_at_key.hpp index 406d7ae2..d7f84cd9 100644 --- a/include/boost/fusion/sequence/intrinsic/value_at_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/value_at_key.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -42,7 +42,7 @@ namespace boost { namespace fusion }; template <> - struct value_at_key_impl; + struct value_at_key_impl; template <> struct value_at_key_impl; diff --git a/include/boost/fusion/support/category_of.hpp b/include/boost/fusion/support/category_of.hpp index 8877b347..73def5b0 100644 --- a/include/boost/fusion/support/category_of.hpp +++ b/include/boost/fusion/support/category_of.hpp @@ -15,7 +15,7 @@ namespace boost { namespace fusion { // Special tags: struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -48,7 +48,7 @@ namespace boost { namespace fusion struct category_of_impl; template <> - struct category_of_impl; + struct category_of_impl; template <> struct category_of_impl; diff --git a/include/boost/fusion/support/ext_/is_segmented.hpp b/include/boost/fusion/support/ext_/is_segmented.hpp old mode 100755 new mode 100644 index 38def075..63330a4a --- a/include/boost/fusion/support/ext_/is_segmented.hpp +++ b/include/boost/fusion/support/ext_/is_segmented.hpp @@ -14,7 +14,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag struct iterator_range_tag; diff --git a/include/boost/fusion/support/is_sequence.hpp b/include/boost/fusion/support/is_sequence.hpp index 84dc2ec1..9ad50ec1 100644 --- a/include/boost/fusion/support/is_sequence.hpp +++ b/include/boost/fusion/support/is_sequence.hpp @@ -19,7 +19,7 @@ namespace boost { namespace fusion // Special tags: struct non_fusion_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -43,7 +43,7 @@ namespace boost { namespace fusion struct is_sequence_impl; template <> - struct is_sequence_impl; + struct is_sequence_impl; template <> struct is_sequence_impl; diff --git a/include/boost/fusion/support/is_view.hpp b/include/boost/fusion/support/is_view.hpp index a89291d1..e2cf6eb4 100644 --- a/include/boost/fusion/support/is_view.hpp +++ b/include/boost/fusion/support/is_view.hpp @@ -15,7 +15,7 @@ namespace boost { namespace fusion // Special tags: struct sequence_facade_tag; struct boost_tuple_tag; // boost::tuples::tuple tag - struct array_tag; // boost::array tag + struct boost_array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -41,7 +41,7 @@ namespace boost { namespace fusion struct is_view_impl; template <> - struct is_view_impl; + struct is_view_impl; template <> struct is_view_impl; diff --git a/test/Jamfile b/test/Jamfile index 1b9a6122..8ed08c4e 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -81,6 +81,7 @@ import testing ; [ run sequence/set.cpp : : : : ] [ run sequence/single_view.cpp : : : : ] [ run sequence/std_pair.cpp : : : : ] + [ run sequence/boost_array.cpp : : : : ] [ run sequence/array.cpp : : : : ] [ run sequence/tuple_comparison.cpp : : : : ] [ run sequence/tuple_construction.cpp : : : : ] diff --git a/test/sequence/array.cpp b/test/sequence/boost_array.cpp similarity index 79% rename from test/sequence/array.cpp rename to test/sequence/boost_array.cpp index 07b5f48e..fbe11761 100644 --- a/test/sequence/array.cpp +++ b/test/sequence/boost_array.cpp @@ -1,6 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt 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) @@ -8,19 +9,15 @@ #include -#include +#include #include #include #include #include #include -#include -#include -#include #include -#include int main() { @@ -41,8 +38,5 @@ int main() BOOST_TEST(size(arr) == 3); BOOST_TEST(distance(begin(arr), end(arr)) == 3); - BOOST_MPL_ASSERT((boost::mpl::is_sequence)); - BOOST_MPL_ASSERT((boost::is_same::type>)); - return boost::report_errors(); }