From 2c1a03f7854d0468a2735026b71f1b42403d1b2f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 20 Dec 2007 23:24:28 +0000 Subject: [PATCH] Removing fusion variant adapter [SVN r42223] --- include/boost/fusion/adapted.hpp | 4 +- include/boost/fusion/adapted/struct.hpp | 17 ++- .../boost/fusion/adapted/struct/extension.hpp | 2 +- include/boost/fusion/adapted/variant.hpp | 20 --- .../adapted/variant/detail/begin_impl.hpp | 45 ------- .../variant/detail/category_of_impl.hpp | 33 ----- .../adapted/variant/detail/end_impl.hpp | 45 ------- .../variant/detail/is_sequence_impl.hpp | 31 ----- .../adapted/variant/detail/is_view_impl.hpp | 31 ----- .../adapted/variant/detail/size_impl.hpp | 32 ----- .../boost/fusion/adapted/variant/tag_of.hpp | 32 ----- .../adapted/variant/variant_iterator.hpp | 117 ------------------ include/boost/fusion/include/variant.hpp | 12 -- 13 files changed, 14 insertions(+), 407 deletions(-) delete mode 100644 include/boost/fusion/adapted/variant.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/begin_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/category_of_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/end_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/is_sequence_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/is_view_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/detail/size_impl.hpp delete mode 100644 include/boost/fusion/adapted/variant/tag_of.hpp delete mode 100644 include/boost/fusion/adapted/variant/variant_iterator.hpp delete mode 100644 include/boost/fusion/include/variant.hpp diff --git a/include/boost/fusion/adapted.hpp b/include/boost/fusion/adapted.hpp index 23693645..c343405c 100644 --- a/include/boost/fusion/adapted.hpp +++ b/include/boost/fusion/adapted.hpp @@ -2,7 +2,7 @@ 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_ADAPTED_30122005_1420) @@ -12,6 +12,6 @@ #include #include #include -#include +#include #endif diff --git a/include/boost/fusion/adapted/struct.hpp b/include/boost/fusion/adapted/struct.hpp index 063f8f32..c3c24e0b 100644 --- a/include/boost/fusion/adapted/struct.hpp +++ b/include/boost/fusion/adapted/struct.hpp @@ -10,14 +10,19 @@ #include #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/struct/extension.hpp b/include/boost/fusion/adapted/struct/extension.hpp index da084498..071b11e9 100644 --- a/include/boost/fusion/adapted/struct/extension.hpp +++ b/include/boost/fusion/adapted/struct/extension.hpp @@ -50,7 +50,7 @@ namespace boost { namespace fusion { namespace extension struct struct_assoc_member { typedef typename - add_const::type>::type + add_const::type>::type type; static type& diff --git a/include/boost/fusion/adapted/variant.hpp b/include/boost/fusion/adapted/variant.hpp deleted file mode 100644 index 5e711c17..00000000 --- a/include/boost/fusion/adapted/variant.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - 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_VARIANT_12112006_1614) -#define BOOST_FUSION_VARIANT_12112006_1614 - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/begin_impl.hpp b/include/boost/fusion/adapted/variant/detail/begin_impl.hpp deleted file mode 100644 index dc9e2e7f..00000000 --- a/include/boost/fusion/adapted/variant/detail/begin_impl.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - 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_VARIANT_BEGIN_IMPL_12112006_2137) -#define BOOST_FUSION_VARIANT_BEGIN_IMPL_12112006_2137 - -#include - -namespace boost { namespace fusion { - - struct variant_tag; - - template - struct variant_iterator; - - namespace extension - { - template - struct begin_impl; - - template <> - struct begin_impl - { - template - struct apply - { - typedef variant_iterator< - Seq, - typename mpl::begin::type> type; - - static type - call(Seq& v) - { - return type(v); - } - }; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/category_of_impl.hpp b/include/boost/fusion/adapted/variant/detail/category_of_impl.hpp deleted file mode 100644 index d81d9b3b..00000000 --- a/include/boost/fusion/adapted/variant/detail/category_of_impl.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*============================================================================= - 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_VARIANT_CATEGORY_OF_IMPL_13112006_0802) -#define BOOST_FUSION_VARIANT_CATEGORY_OF_IMPL_13112006_0802 - -namespace boost { namespace fusion { - - struct variant_tag; - struct forward_traversal_tag; - - namespace extension - { - template - struct category_of_impl; - - template<> - struct category_of_impl - { - template - struct apply - { - typedef forward_traversal_tag type; - }; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/end_impl.hpp b/include/boost/fusion/adapted/variant/detail/end_impl.hpp deleted file mode 100644 index 622df47f..00000000 --- a/include/boost/fusion/adapted/variant/detail/end_impl.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*============================================================================= - 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_VARIANT_END_IMPL_12112006_2137) -#define BOOST_FUSION_VARIANT_END_IMPL_12112006_2137 - -#include - -namespace boost { namespace fusion { - - struct variant_tag; - - template - struct variant_iterator; - - namespace extension - { - template - struct end_impl; - - template <> - struct end_impl - { - template - struct apply - { - typedef variant_iterator< - Seq, - typename mpl::end::type> type; - - static type - call(Seq& v) - { - return type(v); - } - }; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/is_sequence_impl.hpp b/include/boost/fusion/adapted/variant/detail/is_sequence_impl.hpp deleted file mode 100644 index 132f88a1..00000000 --- a/include/boost/fusion/adapted/variant/detail/is_sequence_impl.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - 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_VARIANT_IS_SEQUENCE_IMPL_13112006_0748) -#define BOOST_FUSION_VARIANT_IS_SEQUENCE_IMPL_13112006_0748 - -#include - -namespace boost { namespace fusion { - - struct variant_tag; - - namespace extension - { - template - struct is_sequence_impl; - - template<> - struct is_sequence_impl - { - template - struct apply : mpl::true_ {}; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/is_view_impl.hpp b/include/boost/fusion/adapted/variant/detail/is_view_impl.hpp deleted file mode 100644 index d58dbd3c..00000000 --- a/include/boost/fusion/adapted/variant/detail/is_view_impl.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*============================================================================= - 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_VARIANT_IS_VIEW_IMPL_13112006_0749) -#define BOOST_FUSION_VARIANT_IS_VIEW_IMPL_13112006_0749 - -#include - -namespace boost { namespace fusion { - - struct variant_tag; - - namespace extension - { - template - struct is_view_impl; - - template<> - struct is_view_impl - { - template - struct apply : mpl::false_ {}; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/detail/size_impl.hpp b/include/boost/fusion/adapted/variant/detail/size_impl.hpp deleted file mode 100644 index 379bac32..00000000 --- a/include/boost/fusion/adapted/variant/detail/size_impl.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - 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_VARIANT_SIZE_IMPL_12112006_2115) -#define BOOST_FUSION_VARIANT_SIZE_IMPL_12112006_2115 - -#include - -namespace boost { namespace fusion { - - struct variant_tag; - - namespace extension - { - template - struct size_impl; - - template<> - struct size_impl - { - template - struct apply : mpl::size - {}; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/tag_of.hpp b/include/boost/fusion/adapted/variant/tag_of.hpp deleted file mode 100644 index fcaa894e..00000000 --- a/include/boost/fusion/adapted/variant/tag_of.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*============================================================================= - 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_VARIANT_TAG_OF_12112006_1704) -#define BOOST_FUSION_VARIANT_TAG_OF_12112006_1704 - -#include -#include - -namespace boost { namespace fusion -{ - struct variant_tag; - - namespace traits - { - template -#if defined(BOOST_PARTIAL_SPECIALIZATION_EXPLICT_ARGS) - struct tag_of, void > -#else - struct tag_of > -#endif - { - typedef variant_tag type; - }; - } -}} - -#endif diff --git a/include/boost/fusion/adapted/variant/variant_iterator.hpp b/include/boost/fusion/adapted/variant/variant_iterator.hpp deleted file mode 100644 index 9372002c..00000000 --- a/include/boost/fusion/adapted/variant/variant_iterator.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/*============================================================================= - 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_VARIANT_ITERATOR_12112006_1617) -#define BOOST_FUSION_VARIANT_ITERATOR_12112006_1617 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace fusion -{ - struct forward_traversal_tag; - - template - struct variant_iterator - : iterator_facade, forward_traversal_tag> - { - typedef Variant variant_type; - typedef MPLIterator iterator; - - variant_iterator(Variant& var) - : var_(var) {} - Variant& var_; - - template - struct next - { - typedef variant_iterator< - typename Iterator::variant_type, - typename mpl::next::type> type; - - static type - call(Iterator const& i) - { - return type(i.var_); - } - }; - - template - struct distance - : mpl::distance< - typename I1::iterator, - typename I2::iterator> - { - typedef typename mpl::distance< - typename I1::iterator, - typename I2::iterator>::type type; - - static type call(I1 const& i1, I2 const& i2) - { - return type(); - } - }; - - template - struct value_of - : mpl::deref - {}; - - template - struct deref - { - typedef typename - mpl::eval_if< - is_const - , add_const::type> - , mpl::deref - >::type - value_type; - - typedef typename - add_reference::type - type; - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) -// for some unknown reason (compiler bug) VC7.1 gets confused with -// variant and optional get functions. - static type - call(Iterator const & it) - { - boost::detail::variant::get_visitor v; - typedef typename mpl::deref::type type; - if (type* result = it.var_.apply_visitor(v)) - return *result; - it.var_ = type(); // prime the variant - return *it.var_.apply_visitor(v); // no-throw! - } -#else - static type - call(Iterator const & it) - { - typedef typename mpl::deref::type type; - if (type* result = boost::get(&it.var_)) - return *result; - it.var_ = type(); // prime the variant - return *boost::get(&it.var_); // no-throw! - } -#endif - }; - }; -}} - -#endif diff --git a/include/boost/fusion/include/variant.hpp b/include/boost/fusion/include/variant.hpp deleted file mode 100644 index 3d013b8e..00000000 --- a/include/boost/fusion/include/variant.hpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 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_VARIANT) -#define FUSION_INCLUDE_VARIANT - -#include - -#endif