From c35180f4f975d325b8e1fd61c44abca3558fa34a Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sat, 20 Oct 2007 13:13:58 +0000 Subject: [PATCH] phase4: refactoring for v2.1 [SVN r40213] --- .../fusion/algorithm/transformation/zip.hpp | 2 +- include/boost/fusion/container/deque.hpp | 3 +- .../deque/convert.hpp} | 11 +-- .../deque}/detail/as_deque.hpp | 2 +- .../container/deque/detail/convert_impl.hpp | 45 +++++++++++ include/boost/fusion/container/list.hpp | 3 +- .../list/convert.hpp} | 13 +-- .../list}/detail/build_cons.hpp | 0 .../container/list/detail/convert_impl.hpp | 51 ++++++++++++ include/boost/fusion/container/map.hpp | 3 +- .../as_map.hpp => container/map/convert.hpp} | 11 +-- .../map}/detail/as_map.hpp | 2 +- .../container/map/detail/convert_impl.hpp | 45 +++++++++++ include/boost/fusion/container/set.hpp | 3 +- .../as_set.hpp => container/set/convert.hpp} | 11 +-- .../set}/detail/as_set.hpp | 2 +- .../container/set/detail/convert_impl.hpp | 45 +++++++++++ include/boost/fusion/container/vector.hpp | 3 +- .../vector/convert.hpp} | 11 +-- .../vector}/detail/as_vector.hpp | 2 +- .../container/vector/detail/convert_impl.hpp | 45 +++++++++++ .../boost/fusion/container/vector/vector.hpp | 2 +- .../functional/adapter/unfused_typed.hpp | 2 +- include/boost/fusion/include/as_vector.hpp | 2 +- include/boost/fusion/mpl/detail/as.hpp | 80 ------------------- include/boost/fusion/mpl/erase.hpp | 15 ++-- include/boost/fusion/mpl/erase_key.hpp | 15 ++-- include/boost/fusion/mpl/insert.hpp | 15 ++-- include/boost/fusion/mpl/insert_range.hpp | 15 ++-- include/boost/fusion/mpl/pop_back.hpp | 15 ++-- include/boost/fusion/mpl/pop_front.hpp | 15 ++-- include/boost/fusion/mpl/push_back.hpp | 15 ++-- include/boost/fusion/mpl/push_front.hpp | 15 ++-- include/boost/fusion/sequence.hpp | 3 +- include/boost/fusion/sequence/conversion.hpp | 16 ---- include/boost/fusion/sequence/convert.hpp | 48 +++++++++++ .../boost/fusion/support/deduce_sequence.hpp | 2 +- .../fusion/view/zip_view/detail/at_impl.hpp | 2 +- .../view/zip_view/detail/deref_impl.hpp | 2 +- .../view/zip_view/detail/value_at_impl.hpp | 2 +- .../view/zip_view/detail/value_of_impl.hpp | 2 +- .../boost/fusion/view/zip_view/zip_view.hpp | 2 +- .../view/zip_view/zip_view_iterator.hpp | 2 +- 43 files changed, 400 insertions(+), 200 deletions(-) rename include/boost/fusion/{sequence/conversion/as_deque.hpp => container/deque/convert.hpp} (84%) rename include/boost/fusion/{sequence/conversion => container/deque}/detail/as_deque.hpp (97%) create mode 100644 include/boost/fusion/container/deque/detail/convert_impl.hpp rename include/boost/fusion/{sequence/conversion/as_list.hpp => container/list/convert.hpp} (83%) rename include/boost/fusion/{sequence/conversion => container/list}/detail/build_cons.hpp (100%) create mode 100644 include/boost/fusion/container/list/detail/convert_impl.hpp rename include/boost/fusion/{sequence/conversion/as_map.hpp => container/map/convert.hpp} (84%) rename include/boost/fusion/{sequence/conversion => container/map}/detail/as_map.hpp (97%) create mode 100644 include/boost/fusion/container/map/detail/convert_impl.hpp rename include/boost/fusion/{sequence/conversion/as_set.hpp => container/set/convert.hpp} (84%) rename include/boost/fusion/{sequence/conversion => container/set}/detail/as_set.hpp (97%) create mode 100644 include/boost/fusion/container/set/detail/convert_impl.hpp rename include/boost/fusion/{sequence/conversion/as_vector.hpp => container/vector/convert.hpp} (84%) rename include/boost/fusion/{sequence/conversion => container/vector}/detail/as_vector.hpp (97%) create mode 100644 include/boost/fusion/container/vector/detail/convert_impl.hpp delete mode 100644 include/boost/fusion/mpl/detail/as.hpp delete mode 100644 include/boost/fusion/sequence/conversion.hpp create mode 100644 include/boost/fusion/sequence/convert.hpp diff --git a/include/boost/fusion/algorithm/transformation/zip.hpp b/include/boost/fusion/algorithm/transformation/zip.hpp index 6d6ee4d1..a2f66bfd 100644 --- a/include/boost/fusion/algorithm/transformation/zip.hpp +++ b/include/boost/fusion/algorithm/transformation/zip.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/container/deque.hpp b/include/boost/fusion/container/deque.hpp index a9eb7aae..bb29ce2f 100644 --- a/include/boost/fusion/container/deque.hpp +++ b/include/boost/fusion/container/deque.hpp @@ -2,13 +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_SEQUENCE_CONTAINER_DEQUE_24112006_2036) #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 #include +#include #endif diff --git a/include/boost/fusion/sequence/conversion/as_deque.hpp b/include/boost/fusion/container/deque/convert.hpp similarity index 84% rename from include/boost/fusion/sequence/conversion/as_deque.hpp rename to include/boost/fusion/container/deque/convert.hpp index 7c7cd7ad..0f3a75e2 100644 --- a/include/boost/fusion/sequence/conversion/as_deque.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -2,18 +2,19 @@ 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_AS_DEQUE_20061213_2207) -#define FUSION_AS_DEQUE_20061213_2207 +#if !defined(FUSION_CONVERT_20061213_2207) +#define FUSION_CONVERT_20061213_2207 -#include +#include +#include #include #include #include -namespace boost { namespace fusion +namespace boost { namespace fusion { namespace result_of { diff --git a/include/boost/fusion/sequence/conversion/detail/as_deque.hpp b/include/boost/fusion/container/deque/detail/as_deque.hpp similarity index 97% rename from include/boost/fusion/sequence/conversion/detail/as_deque.hpp rename to include/boost/fusion/container/deque/detail/as_deque.hpp index 8fcc5643..e48b7910 100644 --- a/include/boost/fusion/sequence/conversion/detail/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/as_deque.hpp @@ -55,7 +55,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/convert_impl.hpp b/include/boost/fusion/container/deque/detail/convert_impl.hpp new file mode 100644 index 00000000..ac310a19 --- /dev/null +++ b/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + 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(FUSION_CONVERT_IMPL_20061213_2207) +#define FUSION_CONVERT_IMPL_20061213_2207 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct deque_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_deque::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/list.hpp b/include/boost/fusion/container/list.hpp index cfc0fd3d..8a0d6456 100644 --- a/include/boost/fusion/container/list.hpp +++ b/include/boost/fusion/container/list.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_SEQUENCE_CLASS_LIST_10022005_0605) @@ -12,5 +12,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/sequence/conversion/as_list.hpp b/include/boost/fusion/container/list/convert.hpp similarity index 83% rename from include/boost/fusion/sequence/conversion/as_list.hpp rename to include/boost/fusion/container/list/convert.hpp index 8be72890..418158cf 100644 --- a/include/boost/fusion/sequence/conversion/as_list.hpp +++ b/include/boost/fusion/container/list/convert.hpp @@ -1,26 +1,27 @@ /*============================================================================= 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_AS_LIST_09232005_1215) -#define FUSION_AS_LIST_09232005_1215 +#if !defined(FUSION_CONVERT_09232005_1215) +#define FUSION_CONVERT_09232005_1215 #include +#include +#include #include #include #include -#include -namespace boost { namespace fusion +namespace boost { namespace fusion { namespace result_of { template struct as_list { - typedef typename + typedef typename detail::build_cons< typename result_of::begin::type , typename result_of::end::type diff --git a/include/boost/fusion/sequence/conversion/detail/build_cons.hpp b/include/boost/fusion/container/list/detail/build_cons.hpp similarity index 100% rename from include/boost/fusion/sequence/conversion/detail/build_cons.hpp rename to include/boost/fusion/container/list/detail/build_cons.hpp diff --git a/include/boost/fusion/container/list/detail/convert_impl.hpp b/include/boost/fusion/container/list/detail/convert_impl.hpp new file mode 100644 index 00000000..cfe7a1df --- /dev/null +++ b/include/boost/fusion/container/list/detail/convert_impl.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + 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(FUSION_CONVERT_IMPL_09232005_1215) +#define FUSION_CONVERT_IMPL_09232005_1215 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename + detail::build_cons< + typename result_of::begin::type + , typename result_of::end::type + > + build_cons; + + typedef typename build_cons::type type; + + static type + call(Sequence& seq) + { + return build_cons::call(fusion::begin(seq), fusion::end(seq)); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map.hpp b/include/boost/fusion/container/map.hpp index 5efa1b02..69518311 100644 --- a/include/boost/fusion/container/map.hpp +++ b/include/boost/fusion/container/map.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_SEQUENCE_CLASS_MAP_10022005_0606) @@ -10,5 +10,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/sequence/conversion/as_map.hpp b/include/boost/fusion/container/map/convert.hpp similarity index 84% rename from include/boost/fusion/sequence/conversion/as_map.hpp rename to include/boost/fusion/container/map/convert.hpp index c3e30589..f174da58 100644 --- a/include/boost/fusion/sequence/conversion/as_map.hpp +++ b/include/boost/fusion/container/map/convert.hpp @@ -1,18 +1,19 @@ /*============================================================================= 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_AS_MAP_09232005_1340) -#define FUSION_AS_MAP_09232005_1340 +#if !defined(FUSION_CONVERT_09232005_1340) +#define FUSION_CONVERT_09232005_1340 -#include +#include +#include #include #include #include -namespace boost { namespace fusion +namespace boost { namespace fusion { namespace result_of { diff --git a/include/boost/fusion/sequence/conversion/detail/as_map.hpp b/include/boost/fusion/container/map/detail/as_map.hpp similarity index 97% rename from include/boost/fusion/sequence/conversion/detail/as_map.hpp rename to include/boost/fusion/container/map/detail/as_map.hpp index 0fc61b96..326877f9 100644 --- a/include/boost/fusion/sequence/conversion/detail/as_map.hpp +++ b/include/boost/fusion/container/map/detail/as_map.hpp @@ -54,7 +54,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/convert_impl.hpp b/include/boost/fusion/container/map/detail/convert_impl.hpp new file mode 100644 index 00000000..aedd3e3d --- /dev/null +++ b/include/boost/fusion/container/map/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + 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(FUSION_CONVERT_IMPL_09232005_1340) +#define FUSION_CONVERT_IMPL_09232005_1340 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_map::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/set.hpp b/include/boost/fusion/container/set.hpp index 82c4ccc8..6b7674d6 100644 --- a/include/boost/fusion/container/set.hpp +++ b/include/boost/fusion/container/set.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_SEQUENCE_CLASS_SET_10022005_0607) @@ -10,5 +10,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/sequence/conversion/as_set.hpp b/include/boost/fusion/container/set/convert.hpp similarity index 84% rename from include/boost/fusion/sequence/conversion/as_set.hpp rename to include/boost/fusion/container/set/convert.hpp index 34ee007d..1aaddf0c 100644 --- a/include/boost/fusion/sequence/conversion/as_set.hpp +++ b/include/boost/fusion/container/set/convert.hpp @@ -1,18 +1,19 @@ /*============================================================================= 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_AS_SET_09232005_1341) -#define FUSION_AS_SET_09232005_1341 +#if !defined(FUSION_CONVERT_09232005_1341) +#define FUSION_CONVERT_09232005_1341 -#include +#include +#include #include #include #include -namespace boost { namespace fusion +namespace boost { namespace fusion { namespace result_of { diff --git a/include/boost/fusion/sequence/conversion/detail/as_set.hpp b/include/boost/fusion/container/set/detail/as_set.hpp similarity index 97% rename from include/boost/fusion/sequence/conversion/detail/as_set.hpp rename to include/boost/fusion/container/set/detail/as_set.hpp index 96a93e70..33786338 100644 --- a/include/boost/fusion/sequence/conversion/detail/as_set.hpp +++ b/include/boost/fusion/container/set/detail/as_set.hpp @@ -54,7 +54,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_SET_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/set/detail/convert_impl.hpp b/include/boost/fusion/container/set/detail/convert_impl.hpp new file mode 100644 index 00000000..1aa79fb1 --- /dev/null +++ b/include/boost/fusion/container/set/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + 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(FUSION_CONVERT_IMPL_09232005_1341) +#define FUSION_CONVERT_IMPL_09232005_1341 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct set_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_set::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/vector.hpp b/include/boost/fusion/container/vector.hpp index 2766ac6a..389a102e 100644 --- a/include/boost/fusion/container/vector.hpp +++ b/include/boost/fusion/container/vector.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_SEQUENCE_CLASS_VECTOR_10022005_0602) @@ -16,5 +16,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/sequence/conversion/as_vector.hpp b/include/boost/fusion/container/vector/convert.hpp similarity index 84% rename from include/boost/fusion/sequence/conversion/as_vector.hpp rename to include/boost/fusion/container/vector/convert.hpp index ef1590fd..a31578a2 100644 --- a/include/boost/fusion/sequence/conversion/as_vector.hpp +++ b/include/boost/fusion/container/vector/convert.hpp @@ -1,18 +1,19 @@ /*============================================================================= 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_AS_VECTOR_09222005_1104) -#define FUSION_AS_VECTOR_09222005_1104 +#if !defined(FUSION_CONVERT_09222005_1104) +#define FUSION_CONVERT_09222005_1104 -#include +#include +#include #include #include #include -namespace boost { namespace fusion +namespace boost { namespace fusion { namespace result_of { diff --git a/include/boost/fusion/sequence/conversion/detail/as_vector.hpp b/include/boost/fusion/container/vector/detail/as_vector.hpp similarity index 97% rename from include/boost/fusion/sequence/conversion/detail/as_vector.hpp rename to include/boost/fusion/container/vector/detail/as_vector.hpp index a472ed52..fa8dadcf 100644 --- a/include/boost/fusion/sequence/conversion/detail/as_vector.hpp +++ b/include/boost/fusion/container/vector/detail/as_vector.hpp @@ -54,7 +54,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_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/vector/detail/convert_impl.hpp b/include/boost/fusion/container/vector/detail/convert_impl.hpp new file mode 100644 index 00000000..5e1d080f --- /dev/null +++ b/include/boost/fusion/container/vector/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + 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(FUSION_CONVERT_IMPL_09222005_1104) +#define FUSION_CONVERT_IMPL_09222005_1104 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_vector::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index b73ee510..bd05badd 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/functional/adapter/unfused_typed.hpp b/include/boost/fusion/functional/adapter/unfused_typed.hpp index 561e8112..9ee3a7a6 100644 --- a/include/boost/fusion/functional/adapter/unfused_typed.hpp +++ b/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/boost/fusion/include/as_vector.hpp b/include/boost/fusion/include/as_vector.hpp index 2136b492..4c9b39d0 100644 --- a/include/boost/fusion/include/as_vector.hpp +++ b/include/boost/fusion/include/as_vector.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_AS_VECTOR) #define FUSION_INCLUDE_AS_VECTOR -#include +#include #endif diff --git a/include/boost/fusion/mpl/detail/as.hpp b/include/boost/fusion/mpl/detail/as.hpp deleted file mode 100644 index 1537e549..00000000 --- a/include/boost/fusion/mpl/detail/as.hpp +++ /dev/null @@ -1,80 +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_AS_10022005_1442) -#define FUSION_AS_10022005_1442 - -namespace boost { namespace fusion -{ - namespace result_of - { - template - struct as_list; - - template - struct as_map; - - template - struct as_set; - - template - struct as_vector; - - template - struct as_deque; - } - - namespace detail - { - template - struct as_impl; - - template <> - struct as_impl - { - template - struct apply : result_of::as_list {}; - }; - - template <> - struct as_impl - { - template - struct apply : result_of::as_map {}; - }; - - template <> - struct as_impl - { - template - struct apply : result_of::as_set {}; - }; - - template <> - struct as_impl - { - template - struct apply : result_of::as_vector {}; - }; - - template<> - struct as_impl - { - template - struct apply : result_of::as_deque {}; - }; - - template - struct as - { - typedef typename - as_impl::template apply::type - type; - }; - } -}} - -#endif diff --git a/include/boost/fusion/mpl/erase.hpp b/include/boost/fusion/mpl/erase.hpp index c4ffad78..a8b092ae 100644 --- a/include/boost/fusion/mpl/erase.hpp +++ b/include/boost/fusion/mpl/erase.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_ERASE_10022005_1835) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::erase::type + typedef typename + fusion::result_of::erase::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/erase_key.hpp b/include/boost/fusion/mpl/erase_key.hpp index f5d3635a..3cda2686 100644 --- a/include/boost/fusion/mpl/erase_key.hpp +++ b/include/boost/fusion/mpl/erase_key.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_ERASE_KEY_10022005_1907) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::erase_key::type + typedef typename + fusion::result_of::erase_key::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/insert.hpp b/include/boost/fusion/mpl/insert.hpp index d6083b8d..76918ce9 100644 --- a/include/boost/fusion/mpl/insert.hpp +++ b/include/boost/fusion/mpl/insert.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_INSERT_10022005_1837) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::insert::type + typedef typename + fusion::result_of::insert::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/insert_range.hpp b/include/boost/fusion/mpl/insert_range.hpp index 21ed11c9..4da39365 100644 --- a/include/boost/fusion/mpl/insert_range.hpp +++ b/include/boost/fusion/mpl/insert_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_INSERT_RANGE_10022005_1838) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::insert_range::type + typedef typename + fusion::result_of::insert_range::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/pop_back.hpp b/include/boost/fusion/mpl/pop_back.hpp index 27364cd3..84bd75a4 100644 --- a/include/boost/fusion/mpl/pop_back.hpp +++ b/include/boost/fusion/mpl/pop_back.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_POP_BACK_10022005_1801) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::pop_back::type + typedef typename + fusion::result_of::pop_back::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/pop_front.hpp b/include/boost/fusion/mpl/pop_front.hpp index 4ae96700..ffe6c302 100644 --- a/include/boost/fusion/mpl/pop_front.hpp +++ b/include/boost/fusion/mpl/pop_front.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_POP_FRONT_10022005_1800) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::pop_front::type + typedef typename + fusion::result_of::pop_front::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/push_back.hpp b/include/boost/fusion/mpl/push_back.hpp index 8acafcd1..e96faa06 100644 --- a/include/boost/fusion/mpl/push_back.hpp +++ b/include/boost/fusion/mpl/push_back.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_PUSH_BACK_10022005_1647) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::push_back::type + typedef typename + fusion::result_of::push_back::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/mpl/push_front.hpp b/include/boost/fusion/mpl/push_front.hpp index 48b59215..c508d652 100644 --- a/include/boost/fusion/mpl/push_front.hpp +++ b/include/boost/fusion/mpl/push_front.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_PUSH_FRONT_10022005_1720) @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace mpl { @@ -23,12 +23,13 @@ namespace boost { namespace mpl template struct apply { - typedef typename - fusion::result_of::push_front::type + typedef typename + fusion::result_of::push_front::type result; - - typedef typename - fusion::detail::as::type, result>::type + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type type; }; }; diff --git a/include/boost/fusion/sequence.hpp b/include/boost/fusion/sequence.hpp index d8fb2f8b..e60fdd7d 100644 --- a/include/boost/fusion/sequence.hpp +++ b/include/boost/fusion/sequence.hpp @@ -9,10 +9,9 @@ #include #include -#include #include #include #include -#include +#include #endif diff --git a/include/boost/fusion/sequence/conversion.hpp b/include/boost/fusion/sequence/conversion.hpp deleted file mode 100644 index e70cc88a..00000000 --- a/include/boost/fusion/sequence/conversion.hpp +++ /dev/null @@ -1,16 +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_SEQUENCE_CONVERSION_10022005_0622) -#define FUSION_SEQUENCE_CONVERSION_10022005_0622 - -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/fusion/sequence/convert.hpp b/include/boost/fusion/sequence/convert.hpp new file mode 100644 index 00000000..a6e3ccca --- /dev/null +++ b/include/boost/fusion/sequence/convert.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + 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_CONVERT_10022005_1442) +#define FUSION_CONVERT_10022005_1442 + +namespace boost { namespace fusion +{ + namespace extension + { + template + struct convert_impl; + } + + namespace result_of + { + template + struct convert + { + typedef typename extension::convert_impl gen; + + typedef typename + gen::template apply::type + type; + }; + } + + template + inline typename result_of::convert::type + convert(Sequence& seq) + { + typedef typename result_of::convert::gen gen; + return gen::call(seq); + } + + template + inline typename result_of::convert::type + convert(Sequence const& seq) + { + typedef typename result_of::convert::gen gen; + return gen::call(seq); + } +}} + +#endif diff --git a/include/boost/fusion/support/deduce_sequence.hpp b/include/boost/fusion/support/deduce_sequence.hpp index 13f4a99f..9cf97922 100644 --- a/include/boost/fusion/support/deduce_sequence.hpp +++ b/include/boost/fusion/support/deduce_sequence.hpp @@ -10,7 +10,7 @@ #define BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP_INCLUDED #include -#include +#include #include #include diff --git a/include/boost/fusion/view/zip_view/detail/at_impl.hpp b/include/boost/fusion/view/zip_view/detail/at_impl.hpp index 45589777..b01b8cfa 100644 --- a/include/boost/fusion/view/zip_view/detail/at_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/at_impl.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/view/zip_view/detail/deref_impl.hpp b/include/boost/fusion/view/zip_view/detail/deref_impl.hpp index 736ea176..69cc8825 100644 --- a/include/boost/fusion/view/zip_view/detail/deref_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/deref_impl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include 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 ed5475ba..7905b063 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 @@ -8,7 +8,7 @@ #if !defined(FUSION_VALUE_AT_IMPL_20060124_2129) #define FUSION_VALUE_AT_IMPL_20060124_2129 -#include +#include #include #include #include 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 531d2350..4ba4c3c5 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 @@ -8,7 +8,7 @@ #if !defined(FUSION_VALUE_OF_IMPL_20060124_2147) #define FUSION_VALUE_OF_IMPL_20060124_2147 -#include +#include #include #include #include diff --git a/include/boost/fusion/view/zip_view/zip_view.hpp b/include/boost/fusion/view/zip_view/zip_view.hpp index af026241..5f152eb0 100644 --- a/include/boost/fusion/view/zip_view/zip_view.hpp +++ b/include/boost/fusion/view/zip_view/zip_view.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/fusion/view/zip_view/zip_view_iterator.hpp b/include/boost/fusion/view/zip_view/zip_view_iterator.hpp index ef93e2c9..66b514dc 100644 --- a/include/boost/fusion/view/zip_view/zip_view_iterator.hpp +++ b/include/boost/fusion/view/zip_view/zip_view_iterator.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace boost { namespace fusion {