|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57341 - in sandbox/SOC/2009/fusion/boost/fusion: adapted/detail/mpl adapted/detail/struct algorithm/query/detail algorithm/transformation algorithm/transformation/detail container/detail container/detail/pp container/detail/variadic_templates container/generation/detail/pp container/list container/list/detail container/list/detail/cons container/list/detail/list container/list/detail/pp container/list/detail/variadic_templates container/map container/set container/vector/detail/pp container/vector/detail/variadic_templates sequence/intrinsic/ext_ support support/internal/variadic_templates tuple view/filter_view view/joint_view view/nview view/repetitive_view view/repetitive_view/detail view/reverse_view view/reverse_view/detail view/single_view view/single_view/detail view/transform_view view/transform_view/detail
From: mr.chr.schmidt_at_[hidden]
Date: 2009-11-03 13:29:19
Author: cschmidt
Date: 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
New Revision: 57341
URL: http://svn.boost.org/trac/boost/changeset/57341
Log:
cleanup (2)
Added:
sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_interface.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_interface.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_interface.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/at_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/begin_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/build_cons.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_fwd.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_gen.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_iterator.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/convert_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/deref_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/end_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/equal_to_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/next_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/cons_gen.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/list_forward_ctor.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_at_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_of_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/variadic_templates/
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/variadic_templates/cons_gen.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/at_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_at_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/at_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/distance_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/prior_impl.hpp (contents, props changed)
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_at_impl.hpp (contents, props changed)
Removed:
sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp
sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp
sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/
sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/
Text files modified:
sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp | 8 +++
sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp | 1
sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp | 1
sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp | 33 ++++++++---------
sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp | 71 ++++++++++++++++---------------------
sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp | 4 --
sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp | 24 +-----------
sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp | 24 +-----------
sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp | 26 +------------
sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/ext_/size_s.hpp | 14 ++++--
sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp | 5 +-
sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector_c.hpp | 5 +-
sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp | 19 +---------
sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp | 12 ++++-
sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/view/nview/nview.hpp | 5 +-
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/advance_impl.hpp | 2
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/begin_impl.hpp | 5 ++
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/end_impl.hpp | 5 ++
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/next_impl.hpp | 30 +++++++++------
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/prior_impl.hpp | 34 +++++++++++------
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/repetitive_view_iterator.hpp | 23 +++---------
sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/repetitive_view.hpp | 74 +++++++++++++++++++++++++++++++++++++--
sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp | 1
sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp | 4 +
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp | 15 ++++++-
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp | 15 ++++++-
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp | 22 +++++++----
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp | 15 ++++---
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp | 1
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp | 55 +++++++----------------------
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp | 8 +---
sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp | 42 ++++++++++++++++-----
sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp | 5 +-
50 files changed, 337 insertions(+), 317 deletions(-)
Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -9,6 +9,7 @@
#include <boost/fusion/support/tag_of.hpp>
+#include <boost/mpl/apply.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/or.hpp>
@@ -41,7 +42,12 @@
struct tag_of_fallback;
template<typename T>
- struct tag_of_fallback<T, typename enable_if<typename mpl::always<mpl::true_>::apply<T>::type>::type>
+ struct tag_of_fallback<
+ T
+ , typename enable_if<
+ typename mpl::apply1<mpl::always<mpl::true_>,T>::type
+ >::type
+ >
{
typedef typename detail::identity<T>::type identity_t;
Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -36,7 +36,7 @@
struct apply
{
struct type
- : random_access_traversal_tag, associative_sequence_tag
+ : random_access_traversal_tag, associative_tag
{};
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -20,7 +20,7 @@
struct assoc_struct_iterator_tag;
struct assoc_struct_category
- : bidirectional_traversal_tag, associative_sequence_tag
+ : bidirectional_traversal_tag, associative_tag
{};
namespace extension
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -68,7 +68,7 @@
is_convertible<T1_nonref, T2_nonref>
, is_convertible<T2_nonref, T1_nonref>
>::value
- >::call(BOOST_FUSION_FORWARD(T1Ref,x),BOOST_FUSION_FORWARD(T2,y));
+ >::call(static_cast<T1Ref>(x),BOOST_FUSION_FORWARD(T2,y));
}
T1Ref x;
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -35,7 +35,7 @@
typedef typename storage_type::type seq_type;
typedef Pred pred_type;
- typedef associative_sequence_tag category;
+ typedef associative_tag category;
typedef filter_key_view_tag fusion_tag;
typedef fusion_sequence_tag tag;
typedef mpl::true_ is_view;
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -82,7 +82,7 @@
fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),\
pos\
),\
- BOOST_FUSION_FORWARD(Range RANGE_CV_REF_MODIFIER,range)\
+ static_cast<Range RANGE_CV_REF_MODIFIER>(range)\
),\
right_type(\
pos,\
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -46,8 +46,8 @@
result_of::join<\
Seq1 SEQ1_CV_REF_MODIFIER\
, Seq2 SEQ2_CV_REF_MODIFIER\
- >::type(BOOST_FUSION_FORWARD(Seq1 SEQ1_CV_REF_MODIFIER,seq1)\
- , BOOST_FUSION_FORWARD(Seq2 SEQ2_CV_REF_MODIFIER,seq2));\
+ >::type(static_cast<Seq1 SEQ1_CV_REF_MODIFIER>(seq1)\
+ , static_cast<Seq2 SEQ2_CV_REF_MODIFIER>(seq2));\
}
BOOST_FUSION_JOIN(
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -155,8 +155,8 @@
, Seq2 SEQ2_CV_REF_MODIFIER\
, BOOST_FUSION_RREF_ELSE_OBJ(F)\
, IsAssociative\
- >::type(BOOST_FUSION_FORWARD(Seq1 SEQ1_CV_REF_MODIFIER,seq1)\
- , BOOST_FUSION_FORWARD(Seq2 SEQ2_CV_REF_MODIFIER,seq2)\
+ >::type(static_cast<Seq1 SEQ1_CV_REF_MODIFIER>(seq1)\
+ , static_cast<Seq2 SEQ2_CV_REF_MODIFIER>(seq2)\
, BOOST_FUSION_FORWARD(F,f));\
}\
\
Deleted: sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
+++ (empty file)
@@ -1,25 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 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(BOOST_FUSION_SEQ_NAME) && !defined(BOOST_FUSION_CONTAINER_DETAIL_FORWARD_CTOR_HPP)
-# define BOOST_FUSION_CONTAINER_DETAIL_FORWARD_CTOR_HPP
-# include <boost/config.hpp>
-#endif
-
-#ifdef BOOST_FUSION_USE_BASE_TYPE
-# define BOOST_FUSION_INIT_BASE base_type
-#else
-# define BOOST_FUSION_INIT_BASE data
-#endif
-
-#ifdef BOOST_NO_VARIADIC_TEMPLATES
-# include <boost/fusion/container/detail/pp/forward_ctor.hpp>
-#else
-# include <boost/fusion/container/detail/variadic_templates/forward_ctor.hpp>
-#endif
-
-#undef BOOST_FUSION_INIT_BASE
Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_interface.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_interface.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2009 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(BOOST_FUSION_SEQ_NAME) && !defined(BOOST_FUSION_CONTAINER_DETAIL_FORWARD_INTERFACE_HPP)
+# define BOOST_FUSION_CONTAINER_DETAIL_FORWARD_INTERFACE_HPP
+# include <boost/config.hpp>
+#endif
+
+#ifndef BOOST_FUSION_SEQ_NAME
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/detail/pp/forward_interface.hpp>
+# else
+# include <boost/fusion/container/detail/variadic_templates/forward_interface.hpp>
+# endif
+#else
+
+# ifdef BOOST_FUSION_USE_BASE_TYPE
+# define BOOST_FUSION_SEQ_CTOR(COMBINATION,_)\
+ BOOST_FUSION_SEQ_NAME(BOOST_FUSION_SEQ_NAME COMBINATION seq)\
+ : base_type(static_cast<base_type COMBINATION>(seq))\
+ {}
+# else
+# define BOOST_FUSION_SEQ_CTOR(COMBINATION,_)\
+ BOOST_FUSION_SEQ_NAME(BOOST_FUSION_SEQ_NAME COMBINATION seq)\
+ : data(static_cast<BOOST_FUSION_SEQ_NAME COMBINATION>(seq).data)\
+ {}
+# endif
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SEQ_CTOR,_)
+
+# undef BOOST_FUSION_SEQ_CTOR
+
+# ifdef BOOST_FUSION_USE_BASE_TYPE
+# define BOOST_FUSION_INIT_BASE base_type
+# else
+# define BOOST_FUSION_INIT_BASE data
+# endif
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/detail/pp/forward_interface.hpp>
+# else
+# include <boost/fusion/container/detail/variadic_templates/forward_interface.hpp>
+# endif
+
+ template<typename SeqAssign>
+ BOOST_FUSION_SEQ_NAME(BOOST_FUSION_R_ELSE_CLREF(SeqAssign) seq_assign)
+ : BOOST_FUSION_INIT_BASE(BOOST_FUSION_FORWARD(SeqAssign,seq_assign))
+ {}
+
+# undef BOOST_FUSION_INIT_BASE
+
+ template <typename Seq>
+ BOOST_FUSION_SEQ_NAME&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+# ifdef BOOST_FUSION_USE_BASE_TYPE
+ *static_cast<base_type*>(this) = BOOST_FUSION_FORWARD(Seq, seq);
+# else
+ data = BOOST_FUSION_FORWARD(Seq, seq);
+# endif
+ return *this;
+ }
+#endif
+
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -62,4 +62,5 @@
};
#undef BOOST_FUSION_N
+
#endif
Deleted: sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
+++ (empty file)
@@ -1,46 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 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)
-==============================================================================*/
-
-#ifndef BOOST_PP_IS_ITERATING
-# ifndef BOOST_FUSION_SEQ_NAME
-# ifndef BOOST_FUSION_CONTAINER_DETAIL_PP_FORWARD_CTOR_HPP
-# include <boost/fusion/support/internal/template.hpp>
-
-# include <boost/config.hpp>
-# include <boost/preprocessor/iterate.hpp>
-# include <boost/preprocessor/repetition/enum_params.hpp>
-# include <boost/preprocessor/repetition/enum_binary_params.hpp>
-# endif
-# else
-# define BOOST_PP_FILENAME_1 <boost/fusion/container/detail/pp/forward_ctor.hpp>
-# define BOOST_PP_ITERATION_LIMITS (1, BOOST_FUSION_MAX_SEQ_SIZE)
-# include BOOST_PP_ITERATE()
-
- template<typename SeqAssign>
- BOOST_FUSION_SEQ_NAME(SeqAssign const& seq_assign)
- : BOOST_FUSION_INIT_BASE(seq_assign)
- {}
-# endif
-#else
-# define BOOST_FUSION_N BOOST_PP_ITERATION()
-
-# ifndef BOOST_NO_RVALUE_REFERENCES
- VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
-# endif
-# if BOOST_FUSION_N == 1
- explicit
-# endif
-# ifdef BOOST_NO_RVALUE_REFERENCES
- BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_CALL_PARAMS(BOOST_FUSION_N))
-# else
- BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_A(BOOST_FUSION_N))
-# endif
- : BOOST_FUSION_INIT_BASE(EXPAND_PARAMETERS_A(BOOST_FUSION_N))
- {}
-
-# undef BOOST_FUSION_N
-#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_interface.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_interface.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_PP_IS_ITERATING
+# ifndef BOOST_FUSION_SEQ_NAME
+# ifndef BOOST_FUSION_CONTAINER_DETAIL_PP_FORWARD_INTERFACE_HPP
+# define BOOST_FUSION_CONTAINER_DETAIL_PP_FORWARD_INTERFACE_HPP
+
+# include <boost/fusion/support/internal/template.hpp>
+
+# include <boost/config.hpp>
+# include <boost/preprocessor/iterate.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# endif
+# else
+# define BOOST_PP_FILENAME_1 <boost/fusion/container/detail/pp/forward_interface.hpp>
+# define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_MAX_SEQ_SIZE)
+# include BOOST_PP_ITERATE()
+# endif
+#else
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+# ifndef BOOST_NO_RVALUE_REFERENCES
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+# endif
+# if BOOST_FUSION_N == 1
+ explicit
+# endif
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_CALL_PARAMS(BOOST_FUSION_N))
+# else
+ BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_A(BOOST_FUSION_N))
+# endif
+ : BOOST_FUSION_INIT_BASE(EXPAND_PARAMETERS_A(BOOST_FUSION_N))
+ {}
+
+# undef BOOST_FUSION_N
+#endif
Deleted: sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
+++ (empty file)
@@ -1,39 +0,0 @@
-/*=============================================================================
- Copyright (c) 2009 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_SEQ_NAME
-# ifndef BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_CTOR_HPP
-# define BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_CTOR_HPP
-# ifdef BOOST_NO_RVALUE_REFERENCES
-# include <boost/call_traits.hpp>
-# endif
-# endif
-#else
-# ifdef BOOST_NO_RVALUE_REFERENCES
- explicit
- BOOST_FUSION_SEQ_NAME(
- typename call_traits<Arguments>::param_type... arguments)
- : BOOST_FUSION_INIT_BASE(arguments)
- {}
-
- template<typename T>
- BOOST_FUSION_SEQ_NAME(T const& t)
- : BOOST_FUSION_INIT_BASE(t)
- {}
-# else
- template <typename... OtherArguments>
- explicit
- BOOST_FUSION_SEQ_NAME(OtherArguments&&... arguments)
- : BOOST_FUSION_INIT_BASE(std::forward<OtherArguments>(arguments)...)
- {}
-
- template<typename T>
- BOOST_FUSION_SEQ_NAME(T&& t)
- : BOOST_FUSION_INIT_BASE(std::forward<T>(t))
- {}
-# endif
-#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_interface.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_interface.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_SEQ_NAME
+# ifndef BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_INTERFACE_HPP
+# define BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_INTERFACE_HPP
+
+# ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/call_traits.hpp>
+# endif
+# endif
+#else
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ BOOST_FUSION_SEQ_NAME(
+ typename call_traits<Arguments>::param_type... arguments)
+ : BOOST_FUSION_INIT_BASE(arguments)
+ {}
+# else
+ template <typename... OtherArguments>
+ explicit
+ BOOST_FUSION_SEQ_NAME(OtherArguments&&... arguments)
+ : BOOST_FUSION_INIT_BASE(std::forward<OtherArguments>(arguments)...)
+ {}
+# endif
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -72,4 +72,5 @@
}
#undef BOOST_FUSION_N
+
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -35,18 +35,16 @@
#include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/enable_if.hpp>
-#include <boost/fusion/container/list/detail/cons/cons_fwd.hpp>
-#include <boost/fusion/container/list/detail/cons/value_at_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/at_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/empty_impl.hpp>
-
-#include <boost/fusion/container/list/detail/cons/cons_iterator.hpp>
-#include <boost/fusion/container/list/detail/cons/begin_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/end_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/deref_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/next_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/value_of_impl.hpp>
-#include <boost/fusion/container/list/detail/cons/equal_to_impl.hpp>
+#include <boost/fusion/container/list/detail/cons_fwd.hpp>
+#include <boost/fusion/container/list/detail/cons_iterator.hpp>
+#include <boost/fusion/container/list/detail/value_at_impl.hpp>
+#include <boost/fusion/container/list/detail/at_impl.hpp>
+#include <boost/fusion/container/list/detail/begin_impl.hpp>
+#include <boost/fusion/container/list/detail/end_impl.hpp>
+#include <boost/fusion/container/list/detail/deref_impl.hpp>
+#include <boost/fusion/container/list/detail/next_impl.hpp>
+#include <boost/fusion/container/list/detail/value_of_impl.hpp>
+#include <boost/fusion/container/list/detail/equal_to_impl.hpp>
namespace boost { namespace fusion
{
@@ -125,10 +123,10 @@
//of cons_.car/cons_.cdr explicitly
#define BOOST_FUSION_CONS_CTOR(COMBINATION,_)\
cons(cons COMBINATION cons_)\
- : car(fusion::front(BOOST_FUSION_FORWARD(cons COMBINATION,cons_)))\
+ : car(fusion::front(static_cast<cons COMBINATION>(cons_)))\
, cdr(detail::assign_by_deref(),\
fusion::next(fusion::begin(\
- BOOST_FUSION_FORWARD(cons COMBINATION,cons_))))\
+ static_cast<cons COMBINATION>(cons_))))\
{}
BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_CONS_CTOR,_);
@@ -226,14 +224,13 @@
return *this;
}
- template<typename Seq>
cons&
- operator=(cons const& seq)
+ operator=(cons const& cons_)
{
#ifdef BOOST_NO_RVALUE_REFERENCES
- return this->operator=<cons<Car,Cdr> >(seq);
+ return this->operator=<cons<Car,Cdr> >(cons_);
#else
- return this->operator=<cons<Car,Cdr> const&>(seq);
+ return this->operator=<cons<Car,Cdr> const&>(cons_);
#endif
}
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -18,6 +18,6 @@
#undef BOOST_FUSION_MAX_SEQ_SIZE
#undef BOOST_FUSION_SEQ_NAME
-#include <boost/fusion/container/list/detail/cons/convert_impl.hpp>
+#include <boost/fusion/container/list/detail/convert_impl.hpp>
#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,62 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_AT_IMPL_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct at_impl;
+
+ template <>
+ struct at_impl<cons_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ Seq
+ , typename value_at_impl<cons_tag>::
+ template apply<Seq, N>::type
+ >::type
+ type;
+
+ template <typename Cons, int N2>
+ static type
+ call(Cons& cons, mpl::int_<N2>)
+ {
+ return call(cons.cdr, mpl::int_<N2-1>());
+ }
+
+ template <typename Cons>
+ static type
+ call(Cons& cons, mpl::int_<0>)
+ {
+ return cons.car;
+ }
+
+ static type
+ call(Seq seq)
+ {
+ return call(seq, mpl::int_<N::value>());
+ }
+ };
+ };
+
+ template <>
+ struct at_impl<list_tag>
+ : at_impl<cons_tag>
+ {};
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/begin_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,39 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_BEGIN_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<cons_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef cons_iterator<typename detail::add_lref<Seq>::type> type;
+
+ static type
+ call(Seq t)
+ {
+ return type(t,0);
+ }
+ };
+ };
+
+ template <>
+ struct begin_impl<list_tag>
+ : begin_impl<cons_tag>
+ {};
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/build_cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/build_cons.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_BUILD_CONS_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_BUILD_CONS_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <
+ typename Begin
+ , typename End
+ , bool is_empty = result_of::equal_to<Begin, End>::value>
+ struct build_cons;
+
+ template <typename Begin, typename End>
+ struct build_cons<Begin, End, true>
+ {
+ typedef nil type;
+
+ static nil
+ call(Begin const&, End const&)
+ {
+ return nil();
+ }
+ };
+
+ template <typename Begin, typename End>
+ struct build_cons<Begin, End, false>
+ {
+ typedef
+ build_cons<typename result_of::next<Begin>::type, End>
+ next_build_cons;
+
+ typedef
+ cons<
+ typename result_of::value_of<Begin>::type
+ , typename next_build_cons::type
+ >
+ type;
+
+ static type
+ call(Begin const& f, End const& l)
+ {
+ return type(
+ fusion::deref(f),
+ next_build_cons::call(fusion::next(f), l));
+ }
+ };
+
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_fwd.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_FWD_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct list_tag;
+ struct cons_tag;
+ struct nil;
+
+ template <typename Car, typename Cdr>
+ struct cons;
+}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_gen.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_GEN_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_GEN_HPP
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/list/detail/pp/cons_gen.hpp>
+#else
+# include <boost/fusion/container/list/detail/variadic_templates/cons_gen.hpp>
+#endif
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons_iterator.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,93 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_ITERATOR_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_ITERATOR_HPP
+
+#include <boost/fusion/container/list/list_fwd.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ struct forward_traversal_tag;
+
+ template<typename ConsRef>
+ struct cons_iterator
+ : iterator_base<cons_iterator<ConsRef> >
+ {
+ typedef cons_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef ConsRef cons_type;
+
+ template<typename OtherConsRef>
+ cons_iterator(cons_iterator<OtherConsRef> const& it)
+ : cons(it.cons)
+ {}
+
+ cons_iterator(cons_type cons, int)
+ : cons(&cons)
+ {}
+
+ template<typename OtherConsRef>
+ cons_iterator&
+ operator=(cons_iterator<OtherConsRef> const& other_it)
+ {
+ cons=other_it.cons;
+ return *this;
+ }
+
+ typename detail::remove_reference<cons_type>::type* cons;
+ };
+
+ struct nil_iterator
+ : iterator_base<nil_iterator>
+ {
+ typedef forward_traversal_tag category;
+ typedef cons_iterator_tag fusion_tag;
+ typedef nil cons_type;
+
+ nil_iterator()
+ {}
+
+ nil_iterator(nil const&,int)
+ {}
+ };
+
+#define BOOST_FUSION_NIL_ITERATOR(COMBINATION,_)\
+ template <>\
+ struct cons_iterator<nil COMBINATION>\
+ : nil_iterator\
+ {\
+ cons_iterator()\
+ {}\
+ \
+ explicit\
+ cons_iterator(nil COMBINATION, int)\
+ {}\
+ };\
+ \
+ template <>\
+ struct cons_iterator<list<> COMBINATION>\
+ : nil_iterator\
+ {\
+ cons_iterator()\
+ {}\
+ \
+ explicit\
+ cons_iterator(nil COMBINATION, int)\
+ {}\
+ };
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(BOOST_FUSION_NIL_ITERATOR,_)
+
+#undef BOOST_FUSION_NIL_ITERATOR
+}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/convert_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/convert_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_CONVERT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONVERT_IMPL_HPP
+
+#include <boost/fusion/container/list/detail/build_cons.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<cons_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef
+ detail::build_cons<
+ typename result_of::begin<Seq>::type
+ , typename result_of::end<Seq>::type
+ >
+ build_cons;
+
+ typedef typename build_cons::type type;
+
+ static type
+ call(Seq seq)
+ {
+ return build_cons::call(
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),
+ fusion::end(BOOST_FUSION_FORWARD(Seq,seq)));
+ }
+ };
+ };
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/deref_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<cons_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<It>::type::cons_type
+ cons_type;
+ typedef typename
+ detail::remove_reference<cons_type>::type::car_type
+ car_type;
+
+ typedef typename
+ detail::forward_as<cons_type,car_type>::type
+ type;
+
+ static type
+ call(It it)
+ {
+ return it.cons->car;
+ }
+ };
+ };
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/end_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_END_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct end_impl;
+
+ template <>
+ struct end_impl<cons_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef
+ cons_iterator<typename detail::forward_as<Seq,nil>::type>
+ type;
+
+ static type
+ call(Seq)
+ {
+ return type();
+ }
+ };
+ };
+
+ template <>
+ struct end_impl<list_tag>
+ : end_impl<cons_tag>
+ {};
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/equal_to_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_EQUAL_TO_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<cons_iterator_tag>
+ {
+ template <typename It1, typename It2>
+ struct apply
+ : is_same<
+ typename detail::identity<
+ typename detail::remove_reference<It1>::type::cons_type
+ >::type
+ , typename detail::identity<
+ typename detail::remove_reference<It2>::type::cons_type
+ >::type
+ >
+ {};
+ };
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/next_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_NEXT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct next_impl;
+
+ template <>
+ struct next_impl<cons_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<It>::type::cons_type
+ cons_type;
+ typedef typename
+ detail::remove_reference<cons_type>::type::cdr_type
+ cdr_type;
+
+ typedef
+ cons_iterator<
+ typename detail::forward_as<cons_type, cdr_type>::type
+ >
+ type;
+
+ static type
+ call(It it)
+ {
+ return type(it.cons->cdr,0);
+ }
+ };
+ };
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/cons_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/cons_gen.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,54 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_PP_IS_ITERATING
+
+# ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_PP_CONS_GEN_HPP
+# define BOOST_FUSION_CONTAINER_LIST_DETAIL_PP_CONS_GEN_HPP
+
+# include <boost/preprocessor/iterate.hpp>
+# include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_LIST_SIZE)
+ struct cons_gen;
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/list/detail/pp/cons_gen.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_LIST_SIZE)
+#include BOOST_PP_ITERATE()
+}}}
+
+# endif
+
+#else
+
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ VARIADIC_TEMPLATE(BOOST_FUSION_N)
+ struct cons_gen
+ EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION(
+ FUSION_MAX_LIST_SIZE,BOOST_FUSION_N)
+ {
+ public:
+# if BOOST_FUSION_N
+ typedef
+ cons<
+ T0
+ , typename cons_gen<
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_FUSION_N, T)
+ >::type
+ >
+ type;
+# else
+ typedef nil type;
+# endif
+ };
+
+# undef BOOST_FUSION_N
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/list_forward_ctor.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/pp/list_forward_ctor.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_PP_IS_ITERATING
+# define BOOST_PP_FILENAME_1 <boost/fusion/container/list/detail/pp/list_forward_ctor.hpp>
+# define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_LIST_SIZE)
+# include BOOST_PP_ITERATE()
+#else
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+# ifndef BOOST_NO_RVALUE_REFERENCES
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+# endif
+# if BOOST_FUSION_N == 1
+ explicit
+# endif
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ list(EXPAND_TEMPLATE_ARGUMENTS_CALL_PARAMS(BOOST_FUSION_N))
+# else
+ list(EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_CLREF(BOOST_FUSION_N))
+# endif
+# if BOOST_FUSION_N
+# if BOOST_FUSION_N <= 1
+ : base_type(EXPAND_PARAMETERS_A(BOOST_FUSION_N))
+# else
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ : base_type(vector<
+ BOOST_PP_ENUM_BINARY_PARAMS(BOOST_FUSION_N,
+ typename call_traits<T,
+ >::param_type BOOST_PP_INTERCEPT)
+ >(EXPAND_PARAMETERS_A(BOOST_FUSION_N)))
+# else
+ : base_type(vector<
+ BOOST_PP_ENUM_BINARY_PARAMS(N, A,&& BOOST_PP_INTERCEPT)
+ >(EXPAND_PARAMETERS_A(BOOST_FUSION_N)))
+# endif
+# endif
+# endif
+ {}
+
+# undef BOOST_FUSION_N
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/mpl/eval_if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<cons_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<Seq>::type
+ seq;
+
+ typedef typename
+ mpl::eval_if<
+ N
+ , apply<typename seq::cdr_type, mpl::int_<N::value-1> >
+ , mpl::identity<typename seq::car_type>
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct value_at_impl<list_tag>
+ : value_at_impl<cons_tag>
+ {};
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/value_of_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<cons_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<
+ typename detail::remove_reference<It>::type::cons_type
+ >::type::car_type
+ type;
+ };
+ };
+}}}
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/variadic_templates/cons_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/variadic_templates/cons_gen.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,31 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_LIST_DETAIL_VARIADIC_TEMPLATES_CONS_GEN_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_VARIADIC_TEMPLATES_CONS_GEN_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename... Args>
+ struct cons_gen;
+
+ template<typename Head, typename... Args>
+ struct cons_gen<Head, Args...>
+ {
+ public:
+ typedef cons<Head, typename cons_gen<Args...>::type> type;
+ };
+
+ template<>
+ struct cons_gen<>
+ {
+ public:
+ typedef nil type;
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -10,68 +10,59 @@
#define BOOST_FUSION_CONTAINER_LIST_LIST_HPP
#include <boost/fusion/container/list/list_fwd.hpp>
-#include <boost/fusion/container/vector/vector.hpp>
-#include <boost/fusion/support/sequence_base.hpp>
-#include <boost/fusion/support/internal/ref.hpp>
-
-#include <boost/fusion/container/list/detail/list/begin_impl.hpp>
-#include <boost/fusion/container/list/detail/list/end_impl.hpp>
-#include <boost/fusion/container/list/detail/list/at_impl.hpp>
-#include <boost/fusion/container/list/detail/list/value_at_impl.hpp>
-#include <boost/fusion/container/list/detail/list/deref_impl.hpp>
-#include <boost/fusion/container/list/detail/list/value_of_impl.hpp>
-
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
+#include <boost/fusion/container/list/detail/cons_gen.hpp>
namespace boost { namespace fusion
{
- struct fusion_sequence_tag;
-
VARIADIC_TEMPLATE(FUSION_MAX_LIST_SIZE)
struct list
- : sequence_base<list<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)> >
+ : detail::cons_gen<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)>::type
{
- typedef bidirectional_traversal_tag category;
- typedef list_tag fusion_tag;
- typedef fusion_sequence_tag tag;
- typedef mpl::false_ is_view;
-
typedef
- vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)>
- storage_type;
- typedef typename storage_type::size size;
+ detail::cons_gen<
+ EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)
+ >
+ cons_gen;
+ typedef typename cons_gen::type base_type;
- list()
- {}
+ typedef list_tag fusion_tag;
-#define BOOST_FUSION_LIST_CTOR(COMBINATION,_)\
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# define BOOST_FUSION_LIST_CTOR(COMBINATION,_)\
list(list COMBINATION list_)\
- : data(BOOST_FUSION_FORWARD(list COMBINATION,list_).data)\
+ : base_type(static_cast<base_type COMBINATION>(list_))\
{}
BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_LIST_CTOR,_)
-#undef BOOST_FUSION_LIST_CTOR
+# undef BOOST_FUSION_LIST_CTOR
-#define BOOST_FUSION_SEQ_NAME list
-#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
-#include <boost/fusion/container/detail/forward_ctor.hpp>
-#undef BOOST_FUSION_MAX_SEQ_SIZE
-#undef BOOST_FUSION_SEQ_NAME
+# include <boost/fusion/container/list/detail/pp/list_forward_ctor.hpp>
+
+ template<typename SeqAssign>
+ list(SeqAssign const& seq_assign)
+ : base_type(seq_assign)
+ {}
template <typename Seq>
list&
operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
{
- data = BOOST_FUSION_FORWARD(Seq, seq);
+ *static_cast<base_type*>(this) = BOOST_FUSION_FORWARD(Seq, seq);
return *this;
}
-
- storage_type& get_data() { return data; }
- storage_type const& get_data() const { return data; }
-
- private:
- storage_type data;
+#else
+# define BOOST_FUSION_USE_BASE_TYPE
+# define BOOST_FUSION_SEQ_NAME list
+# define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
+# include <boost/fusion/container/detail/forward_interface.hpp>
+# undef BOOST_FUSION_MAX_SEQ_SIZE
+# undef BOOST_FUSION_SEQ_NAME
+# undef BOOST_FUSION_USE_BASE_TYPE
+#endif
};
}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -14,10 +14,6 @@
namespace boost { namespace fusion
{
- struct list_tag;
- struct list_iterator_tag;
- struct bidirectional_traversal_tag;
-
VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_LIST_SIZE)
struct list;
}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -25,7 +25,7 @@
#include <boost/fusion/container/map/detail/deref_data_impl.hpp>
#include <boost/fusion/container/map/detail/key_of_impl.hpp>
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
namespace boost { namespace fusion
{
@@ -45,32 +45,12 @@
storage_type;
typedef typename storage_type::size size;
- map()
- {}
-
-#define BOOST_FUSION_MAP_CTOR(COMBINATION,_)\
- map(map COMBINATION map_)\
- : data(BOOST_FUSION_FORWARD(map COMBINATION,map_).data)\
- {}
-
- BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_MAP_CTOR,_)
-
-#undef BOOST_FUSION_MAP_CTOR
-
#define BOOST_FUSION_SEQ_NAME map
#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_MAP_SIZE
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
#undef BOOST_FUSION_MAX_SEQ_SIZE
#undef BOOST_FUSION_SEQ_NAME
- template <typename Seq>
- map&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
- {
- data = BOOST_FUSION_FORWARD(Seq, seq);
- return *this;
- }
-
storage_type& get_data() { return data; }
storage_type const& get_data() const { return data; }
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,7 +19,7 @@
struct map_iterator_tag;
struct map_category
- : bidirectional_traversal_tag, associative_sequence_tag
+ : bidirectional_traversal_tag, associative_tag
{};
VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_MAP_SIZE)
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -24,7 +24,7 @@
#include <boost/fusion/container/set/detail/deref_data_impl.hpp>
#include <boost/fusion/container/set/detail/key_of_impl.hpp>
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
namespace boost { namespace fusion
{
@@ -44,32 +44,12 @@
storage_type;
typedef typename storage_type::size size;
- set()
- {}
-
-#define BOOST_FUSION_SET_CTOR(COMBINATION,_)\
- set(set COMBINATION set_)\
- : data(BOOST_FUSION_FORWARD(set COMBINATION,set_).data)\
- {}
-
- BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SET_CTOR,_)
-
-#undef BOOST_FUSION_SET_CTOR
-
#define BOOST_FUSION_SEQ_NAME set
#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_SET_SIZE
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
#undef BOOST_FUSION_MAX_SEQ_SIZE
#undef BOOST_FUSION_SEQ_NAME
- template <typename Seq>
- set&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
- {
- data = BOOST_FUSION_FORWARD(Seq, seq);
- return *this;
- }
-
storage_type& get_data() { return data; }
storage_type const& get_data() const { return data; }
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,7 +19,7 @@
struct set_iterator_tag;
struct set_category
- : bidirectional_traversal_tag, associative_sequence_tag
+ : bidirectional_traversal_tag, associative_tag
{};
VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_SET_SIZE)
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -16,7 +16,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/add_const.hpp>
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
namespace boost { namespace fusion
{
@@ -36,35 +36,13 @@
base_type;
public:
- vector()
- {}
-
-#define BOOST_FUSION_VECTOR_CTOR(COMBINATION,_)\
- vector(\
- vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)>\
- COMBINATION vec)\
- : base_type(BOOST_FUSION_FORWARD(base_type COMBINATION,vec))\
- {}
-
- BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_CTOR,_);
-
-#undef BOOST_FUSION_VECTOR_CTOR
-
#define BOOST_FUSION_USE_BASE_TYPE
#define BOOST_FUSION_SEQ_NAME vector
#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
#undef BOOST_FUSION_MAX_SEQ_SIZE
#undef BOOST_FUSION_SEQ_NAME
#undef BOOST_FUSION_USE_BASE_TYPE
-
- template <typename Seq>
- vector&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
- {
- *static_cast<base_type*>(this)=BOOST_FUSION_FORWARD(Seq,seq);
- return *this;
- }
};
}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -187,7 +187,7 @@
BOOST_PP_CAT(vector,BOOST_FUSION_N)(Seq COMBINATION seq)\
: BOOST_PP_ENUM(BOOST_FUSION_N,\
BOOST_FUSION_MEMBER_INIT,\
- BOOST_FUSION_FORWARD(Seq COMBINATION,seq))\
+ static_cast<Seq COMBINATION>(seq))\
{\
BOOST_FUSION_MPL_ASSERT((\
mpl::equal_to<size,result_of::size<Seq> >));\
Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -288,7 +288,7 @@
#define VECTOR_CTOR(COMBINATION,_)\
vector(vector COMBINATION vec)\
: base_type(detail::assign_by_deref(),\
- fusion::begin(BOOST_FUSION_FORWARD(vector COMBINATION,vec)))\
+ fusion::begin(static_cast<vector COMBINATION>(vec)))\
{}
BOOST_FUSION_ALL_CTOR_COMBINATIONS(VECTOR_CTOR,_)
Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/ext_/size_s.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/ext_/size_s.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/ext_/size_s.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -31,7 +31,9 @@
template<typename This, typename State, typename Seq>
struct result<This(State, Seq)>
: mpl::plus<
- segmented_size<typename remove_reference<Seq>::type>
+ segmented_size<
+ typename remove_reference<Seq>::type
+ >
, typename remove_reference<State>::type
>
{};
@@ -41,10 +43,12 @@
///////////////////////////////////////////////////////////////////////////
template<typename Sequence, bool IsSegmented>
struct segmented_size
- : result_of::fold<
- typename result_of::segments<Sequence>::type
- , mpl::size_t<0>
- , detail::size_plus
+ : detail::remove_reference<
+ typename result_of::fold<
+ typename result_of::segments<Sequence>::type
+ , mpl::size_t<0>
+ , detail::size_plus
+ >::type
>::type
{};
Modified: sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -82,7 +82,7 @@
}
};
- struct associative_sequence_tag
+ struct associative_tag
{};
namespace extension
@@ -118,7 +118,7 @@
template <typename T>
struct is_associative
: is_base_of<
- associative_sequence_tag
+ associative_tag
, typename category_of<T>::type
>
{
Modified: sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -27,8 +27,9 @@
template<typename...>
struct variadic_arguments_to_vector;
-#define BOOST_PP_ITERATION_PARAMS_1\
- (3, (0, 50, <boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp>))
+#define BOOST_PP_FILENAME_1\
+ <boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, 50)
#include BOOST_PP_ITERATE()
}}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector_c.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector_c.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector_c.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -27,8 +27,9 @@
template<int...>
struct variadic_arguments_to_vector_c;
-#define BOOST_PP_ITERATION_PARAMS_1\
- (3, (0, 50, <boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_c_n.hpp>))
+#define BOOST_PP_FILENAME_1\
+ <boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_c_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, 50)
#include BOOST_PP_ITERATE()
}}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -20,7 +20,7 @@
#include <boost/fusion/support/internal/ref.hpp>
#include <boost/fusion/support/internal/workaround.hpp>
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
namespace boost { namespace fusion
{
@@ -32,14 +32,7 @@
vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)>
base_type;
- tuple()
- {}
-
#define TUPLE_CTOR(COMBINATION,_)\
- tuple(tuple COMBINATION tuple)\
- : base_type(static_cast<base_type COMBINATION>(tuple))\
- {}\
- \
template <typename A1, typename A2>\
tuple(std::pair<A1, A2> COMBINATION pair)\
: base_type(static_cast<std::pair<A1, A2> COMBINATION>(pair))\
@@ -52,18 +45,10 @@
#define BOOST_FUSION_USE_BASE_TYPE
#define BOOST_FUSION_SEQ_NAME tuple
#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
-#include <boost/fusion/container/detail/forward_ctor.hpp>
+#include <boost/fusion/container/detail/forward_interface.hpp>
#undef BOOST_FUSION_MAX_SEQ_SIZE
#undef BOOST_FUSION_SEQ_NAME
#undef BOOST_FUSION_USE_BASE_TYPE
-
- template <typename Seq>
- tuple&
- operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
- {
- *static_cast<base_type*>(this) = BOOST_FUSION_FORWARD(Seq, seq);
- return *this;
- }
};
template <typename Tuple>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -21,11 +21,13 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/inherit.hpp>
#include <boost/mpl/identity.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/type_traits/is_same.hpp>
+#endif
#include <boost/fusion/view/filter_view/detail/filter_view_fwd.hpp>
-#include <boost/fusion/view/filter_view/detail/size_impl.hpp>
-
#include <boost/fusion/view/filter_view/detail/filter_view_iterator.hpp>
+#include <boost/fusion/view/filter_view/detail/size_impl.hpp>
#include <boost/fusion/view/filter_view/detail/begin_impl.hpp>
#include <boost/fusion/view/filter_view/detail/end_impl.hpp>
#include <boost/fusion/view/filter_view/detail/deref_impl.hpp>
@@ -54,7 +56,7 @@
typedef typename
mpl::eval_if<
traits::is_associative<seq_type>
- , mpl::inherit2<forward_traversal_tag,associative_sequence_tag>
+ , mpl::inherit2<forward_traversal_tag,associative_tag>
, mpl::identity<forward_traversal_tag>
>::type
category;
@@ -90,6 +92,10 @@
operator=(BOOST_FUSION_R_ELSE_CLREF(OtherView) other_view)
{
BOOST_FUSION_TAG_CHECK(OtherView,filter_view_tag);
+ BOOST_FUSION_MPL_ASSERT((is_same<
+ pred_type
+ , detail::remove_reference<OtherView>::type::pred_type
+ >));
seq=BOOST_FUSION_FORWARD(OtherView,other_view).seq;
return *this;
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -62,7 +62,7 @@
traits::is_associative<seq1_type>
, traits::is_associative<seq2_type>
>
- , mpl::inherit2<forward_traversal_tag,associative_sequence_tag>
+ , mpl::inherit2<forward_traversal_tag,associative_tag>
, mpl::identity<forward_traversal_tag>
>::type
category;
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/nview/nview.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/nview/nview.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/nview/nview.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -162,8 +162,9 @@
struct as_nview;
}
-# define BOOST_PP_ITERATION_PARAMS_1\
- (3, (0, FUSION_MAX_VECTOR_SIZE, <boost/fusion/view/nview/detail/pp/as_nview.hpp>))
+# define BOOST_PP_FILENAME_1\
+ <boost/fusion/view/nview/detail/pp/as_nview.hpp>
+# define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_VECTOR_SIZE)
#include BOOST_PP_ITERATE()
#endif
}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/advance_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -67,7 +67,7 @@
static type
call(It const& it)
{
- return fusion::advance<real_n>(fusion::begin(it.seq.get()));
+ return fusion::advance<real_n>(fusion::begin(*it.seq));
}
};
}
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/begin_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -26,7 +26,10 @@
typedef
repetitive_view_iterator<
- typename seq::seq_type
+ typename detail::forward_as<
+ Seq
+ , typename seq::seq_type
+ >::type
, typename result_of::begin<typename seq::seq_type>::type
, 0
>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/end_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -91,7 +91,10 @@
typedef
repetitive_view_iterator<
- typename seq::seq_type
+ typename detail::forward_as<
+ Seq
+ , typename seq::seq_type
+ >::type
, typename gen::type
, seq::size::value
>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/next_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -9,13 +9,16 @@
#ifndef BOOST_FUSION_VIEW_REPETITIVE_VIEW_DETAIL_NEXT_IMPL_HPP
#define BOOST_FUSION_VIEW_REPETITIVE_VIEW_DETAIL_NEXT_IMPL_HPP
-#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/identity.hpp>
namespace boost { namespace fusion { namespace extension
{
@@ -26,41 +29,44 @@
struct apply
{
typedef typename detail::remove_reference<It>::type it;
+ typedef typename
+ result_of::next<typename it::it_type>::type
+ next_it;
typedef
- mpl::equal_to<
- typename mpl::next<typename it::index>::type
- , result_of::size<typename it::seq_type>
+ result_of::equal_to<
+ next_it
+ , typename result_of::end<typename it::seq_type>::type
>
- need_begin_it;
+ new_iterator;
typedef
repetitive_view_iterator<
typename it::seq_type
, typename mpl::eval_if<
- need_begin_it
+ new_iterator
, result_of::begin<typename it::seq_type>
- , result_of::next<typename it::it_type>
+ , mpl::identity<next_it>
>::type
, mpl::next<typename it::index>::type::value
>
type;
static type
- call_impl(It it, mpl::true_ /*need_begin_it*/)
+ call_impl(It it, mpl::false_ /*new_iterator*/)
{
- return type(it.seq.get(),fusion::begin(it.seq.seq.get()));
+ return type(*it.seq,fusion::next(it.it));
}
static type
- call_impl(It it, mpl::false_ /*need_begin_it*/)
+ call_impl(It it, mpl::true_ /*new_iterator*/)
{
- return type(it.seq.get(),fusion::next(it.it));
+ return type(*it.seq,begin(*it.seq));
}
static type
call(It it)
{
- return call_impl(it,typename need_begin_it::type());
+ return call_impl(it,new_iterator());
}
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/prior_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -8,11 +8,12 @@
#ifndef BOOST_FUSION_VIEW_REPETITIVE_VIEW_DETAIL_PRIOR_IMPL_HPP
#define BOOST_FUSION_VIEW_REPETITIVE_VIEW_DETAIL_PRIOR_IMPL_HPP
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/equal_to.hpp>
@@ -25,15 +26,24 @@
struct apply
{
typedef typename detail::remove_reference<It>::type it;
+ typedef typename
+ result_of::end<typename it::seq_type>::type
+ seq_end;
+ typedef
+ result_of::equal_to<
+ typename it::it_type
+ , typename result_of::begin<typename it::seq_type>::type
+ >
+ new_iterator;
typedef
repetitive_view_iterator<
typename it::seq_type
, typename result_of::prior<
- typename mpl::eval_if<
- typename it::index
- , mpl::identity<typename it::it_type>
- , result_of::end<typename it::seq_type>
+ typename mpl::if_<
+ new_iterator
+ , seq_end
+ , typename it::it_type
>::type
>::type
, mpl::next<typename it::index>::type::value
@@ -41,22 +51,22 @@
type;
static type
- call_impl(It it, mpl::false_ /*need_end_it*/)
+ call_impl(It it, mpl::false_ /*new_iterator*/)
{
- return type(it.seq.get(),
- fusion::prior(fusion::end(it.seq.get())));
+ return type(it.seq.get(),fusion::prior(it.it));
}
static type
- call_impl(It it, mpl::true_ /*need_end_it*/)
+ call_impl(It it, mpl::true_ /*new_iterator*/)
{
- return type(it.seq.get(),fusion::prior(it.it));
+ return type(it.seq.get(),
+ fusion::prior(fusion::end(*it.seq)));
}
static type
call(It it)
{
- return call_impl(it,mpl::bool_<it::index::value>());
+ return call_impl(it,new_iterator());
}
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/repetitive_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/repetitive_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/detail/repetitive_view_iterator.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,15 +19,11 @@
{
struct repetitive_view_iterator_tag;
- template<
- typename Seq
- , typename It
- , int Index
- >
+ template<typename SeqRef, typename It, int Index>
struct repetitive_view_iterator
- : iterator_base<repetitive_view_iterator<Seq, It, Index> >
+ : iterator_base<repetitive_view_iterator<SeqRef, It, Index> >
{
- typedef Seq seq_type;
+ typedef SeqRef seq_type;
typedef It it_type;
typedef mpl::int_<Index> index;
@@ -42,15 +38,8 @@
BOOST_FUSION_TAG_CHECK(OtherIt,repetitive_view_iterator_tag);
}
- template<typename OtherSeq>
- repetitive_view_iterator(
-#ifdef BOOST_NO_RVALUE_REFERENCES
- typename detail::view_storage<Seq>::call_param seq,
-#else
- OtherSeq&& other_seq,
-#endif
- It const& it)
- : seq(BOOST_FUSION_FORWARD(OtherSeq,other_seq))
+ repetitive_view_iterator(SeqRef seq, It const& it)
+ : seq(&seq)
, it(it)
{}
@@ -65,7 +54,7 @@
return *this;
}
- detail::view_storage<Seq> seq;
+ typename detail::remove_reference<seq_type>::type* seq;
It it;
};
}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/repetitive_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/repetitive_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/repetitive_view/repetitive_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -11,14 +11,19 @@
//TODO doc/testcase/zip_view testcase
+#include <boost/fusion/support/deduce.hpp>
#include <boost/fusion/support/internal/ref.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
#include <boost/fusion/support/internal/assert.hpp>
#include <boost/fusion/view/detail/view_storage.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/long.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/eqaul_to.hpp>
+#endif
#include <boost/integer_traits.hpp>
#include <boost/fusion/view/repetitive_view/detail/repetitive_view_fwd.hpp>
@@ -40,7 +45,7 @@
{
struct fusion_sequence_tag;
- template<typename Seq>
+ template<typename Seq, int Size=integer_traits<int>::const_max-1>
struct repetitive_view
: sequence_base<repetitive_view<Seq> >
{
@@ -50,16 +55,16 @@
typedef typename storage_type::type seq_type;
typedef typename traits::category_of<seq_type>::type category;
- typedef mpl::int_<integer_traits<int>::const_max-1> size;
+ typedef mpl::int_<Size> size;
typedef repetitive_view_tag fusion_tag;
typedef fusion_sequence_tag tag;
typedef mpl::true_ is_view;
#define BOOST_FUSION_REPETITIVE_VIEW_CTOR(COMBINATION,_)\
template<typename OtherSeq>\
- repetitive_view(repetitive_view<OtherSeq> COMBINATION view)\
- : seq(BOOST_FUSION_FORWARD(\
- repetitive_view<OtherSeq> COMBINATION,view).seq)\
+ repetitive_view(repetitive_view<OtherSeq,Size> COMBINATION view)\
+ : seq(static_cast<repetitive_view<OtherSeq,Size> COMBINATION>(\
+ view).seq)\
{}
BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_REPETITIVE_VIEW_CTOR,_)
@@ -84,6 +89,10 @@
operator=(BOOST_FUSION_R_ELSE_CLREF(OtherView) other_view)
{
BOOST_FUSION_TAG_CHECK(OtherView,repetitive_view_tag);
+ BOOST_FUSION_MPL_ASSERT((mpl::equal_to<
+ size
+ , detail::remove_reference<OtherView>::type::size
+ >));
seq=BOOST_FUSION_FORWARD(OtherView,other_view).seq;
return *this;
@@ -92,6 +101,61 @@
detail::view_storage<Seq> seq;
};
+
+ namespace result_of
+ {
+ template<typename Seq, int Size=integer_traits<int>::const_max-1>
+ struct repeat
+ {
+ typedef
+ repetitive_view<typename traits::deduce<Seq>::type, Size>
+ type;
+ };
+ };
+
+ template<int Size, typename Seq>
+ inline typename
+ result_of::repeat<BOOST_FUSION_R_ELSE_CLREF(Seq),Size>::type
+ repeat(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename result_of::repeat<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , Size
+ >::type(BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template<int Size, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::repeat<,Seq,&, Size>)
+ repeat(Seq& seq)
+ {
+ return typename result_of::repeat<Seq&,Size>::type(seq);
+ }
+#endif
+
+ template<typename Seq>
+ inline typename result_of::repeat<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ repeat(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename result_of::repeat<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+ template<typename Seq>
+ //cschmidt: see https://svn.boost.org/trac/boost/ticket/3305
+# if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__GNUC__,<4)
+ typename lazy_disable_if<
+ is_const<Seq>
+ , result_of::repeat<Seq&>
+ >::type
+# else
+ typename result_of::repeat<Seq&>::type
+# endif
+ repeat(Seq& seq)
+ {
+ return typename result_of::repeat<Seq&>::type(seq);
+ }
}}
#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct at_impl;
+
+ template <>
+ struct at_impl<reverse_view_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<Seq>::type seq;
+ typedef mpl::minus<typename seq::size, mpl::int_<1>, N> real_n;
+
+ typedef
+ result_of::at<
+ typename detail::forward_as<
+ Seq
+ , typename seq::seq_type
+ >::type
+ , real_n
+ >::type
+ type;
+
+ static type
+ call(Seq seq)
+ {
+ return fusion::at<real_n>(seq.seq.get());
+ }
+ };
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -23,10 +23,10 @@
struct apply
: result_of::distance<
typename detail::remove_reference<
- BeginRef
+ EndRef
>::type::it_type
, typename detail::remove_reference<
- EndRef
+ BeginRef
>::type::it_type
>
{};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -24,6 +24,7 @@
typedef reverse_view_iterator_tag fusion_tag;
typedef typename traits::category_of<it_type>::type category;
+ explicit
reverse_view_iterator(It const& it)
: it(it)
{}
Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<reverse_view_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<Seq>::type seq;
+
+ typedef
+ result_of::value_at<
+ typename seq::seq_type
+ , mpl::minus<typename seq::size, mpl::int_<1>, N>
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -23,6 +23,7 @@
#include <boost/fusion/view/reverse_view/detail/reverse_view_fwd.hpp>
#include <boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp>
+#include <boost/fusion/view/reverse_view/detail/at_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/begin_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/end_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
@@ -34,6 +35,7 @@
#include <boost/fusion/view/reverse_view/detail/equal_to_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_at_impl.hpp>
#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
namespace boost { namespace fusion
@@ -54,7 +56,7 @@
typedef typename
mpl::eval_if<
traits::is_associative<seq_type>
- , mpl::inherit2<seq_category,associative_sequence_tag>
+ , mpl::inherit2<seq_category,associative_tag>
, mpl::identity<seq_category>
>::type
category;
Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename>
+ struct at_impl;
+
+ template<>
+ struct at_impl<single_view_tag>
+ {
+ template<typename Seq, typename>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ Seq
+ , typename detail::remove_reference<Seq>::type::value_type
+ >::type
+ type;
+
+ static type
+ call(Seq seq)
+ {
+ return seq.val;
+ }
+ };
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,14 +19,23 @@
template <typename Seq>
struct apply
{
+ typedef typename detail::remove_reference<Seq>::type seq;
+
typedef
- single_view_iterator<typename detail::add_lref<Seq>::type>
+ single_view_iterator<
+ typename seq::value_type
+ , typename detail::forward_as<
+ Seq
+ , typename seq::value_type
+ >::type
+ , false
+ >
type;
static type
- call(Seq s)
+ call(Seq seq)
{
- return type(s,0);
+ return type(seq.val);
}
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -22,13 +22,13 @@
struct apply
{
typedef typename
- detail::remove_reference<It>::type::value_type
+ detail::remove_reference<It>::type::value_ref_type
type;
static type
call(It it)
{
- return it.view->val;
+ return *it.val;
}
};
};
Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/distance_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_DISTANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_DISTANCE_IMPL_HPP
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<single_view_iterator_tag>
+ {
+ template<typename Begin, typename End>
+ struct apply
+ : mpl::int_<
+ detail::remove_reference<Begin>::type::end::value==
+ detail::remove_reference<End>::type::end::value
+ ? 0 : 1
+ >
+ {};
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,14 +19,23 @@
template <typename Seq>
struct apply
{
+ typedef typename detail::remove_reference<Seq>::type seq;
+
typedef
- single_view_iterator_end<typename detail::add_lref<Seq>::type>
+ single_view_iterator<
+ typename seq::value_type
+ , typename detail::forward_as<
+ Seq
+ , typename seq::value_type
+ >::type
+ , true
+ >
type;
static type
- call(Seq)
+ call(Seq seq)
{
- return type();
+ return type(seq.val);
}
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -8,6 +8,8 @@
#ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/equal_to.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion { namespace extension
@@ -20,15 +22,17 @@
{
template<typename It1, typename It2>
struct apply
- : is_same<
- typename detail::identity<
- typename detail::remove_reference<It1>::type::view_type
- >::type
- , typename detail::identity<
- typename detail::remove_reference<It2>::type::view_type
- >::type
- >
- {};
+ {
+ typedef typename detail::remove_reference<It1>::type it1;
+ typedef typename detail::remove_reference<It2>::type it2;
+
+ typedef
+ mpl::and_<
+ is_same<typename it1::value_type, typename it2::value_type>
+ , mpl::equal_to<typename it1::end, typename it2::end>
+ >
+ type;
+ };
};
}}}
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2009 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)
@@ -19,18 +20,20 @@
template <typename It>
struct apply
{
+ typedef typename detail::remove_reference<It>::type it;
+
typedef
- single_view_iterator_end<
- typename detail::remove_reference<
- It
- >::type::view_type
+ single_view_iterator<
+ typename it::value_type
+ , typename it::value_ref_type
+ , true
>
type;
static type
- call(It)
+ call(It it)
{
- return type();
+ return type(*it.val);
}
};
};
Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/prior_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_PRIOR_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_PRIOR_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct prior_impl;
+
+ template <>
+ struct prior_impl<single_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename detail::remove_reference<It>::type it;
+
+ typedef
+ single_view_iterator<
+ typename it::value_type
+ , typename it::value_ref_type
+ , false
+ >
+ type;
+
+ static type
+ call(It it)
+ {
+ return type(*it.val);
+ }
+ };
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -11,6 +11,7 @@
namespace boost { namespace fusion
{
struct single_view_tag;
+ struct random_access_traversal_tag;
}}
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -10,59 +10,32 @@
#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_SINGLE_VIEW_ITERATOR_HPP
#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
- struct forward_traversal_tag;
- struct void_;
-
- template <typename SingleView>
- struct single_view_iterator_end
- : iterator_base<single_view_iterator_end<SingleView> >
- {
- typedef void_ view_type;
-
- typedef single_view_iterator_tag fusion_tag;
- typedef forward_traversal_tag category;
- };
-
- template <typename SingleViewRef>
+ //cschmidt: Due to a nasty bug in Proto (ticket #3583,
+ //https://svn.boost.org/trac/boost/ticket/3583) store value_type and
+ //value_ref_type directly, rather than a reference to the view itself.
+ template<typename Value, typename ValueRef, bool End>
struct single_view_iterator
- : iterator_base<single_view_iterator<SingleViewRef> >
+ : iterator_base<single_view_iterator<Value, ValueRef, End> >
{
- typedef SingleViewRef view_type;
- typedef typename
- detail::forward_as<
- SingleViewRef,
- typename detail::remove_reference<
- SingleViewRef
- >::type::value_type
- >::type
- value_type;
+ typedef Value value_type;
+ typedef ValueRef value_ref_type;
+ typedef mpl::bool_<End> end;
typedef single_view_iterator_tag fusion_tag;
- typedef forward_traversal_tag category;
-
- template<typename OtherSingleViewRef>
- single_view_iterator(single_view_iterator<OtherSingleViewRef> const& it)
- : view(it.view)
- {}
+ typedef random_access_traversal_tag category;
- single_view_iterator(SingleViewRef view, int)
- : view(&view)
+ explicit
+ single_view_iterator(value_ref_type val)
+ : val(&val)
{}
- template<typename OtherSingleViewRef>
- single_view_iterator&
- operator=(single_view_iterator<OtherSingleViewRef> const& it)
- {
- view=it.view;
- return *this;
- }
-
- typename detail::remove_reference<SingleViewRef>::type* view;
+ typename detail::remove_reference<value_ref_type>::type* val;
};
}}
Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_at_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2009 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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<single_view_tag>
+ {
+ template<typename Seq, typename>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<Seq>::type::value_type
+ type;
+ };
+ };
+}}}
+
+#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -19,12 +19,8 @@
template <typename It>
struct apply
{
- typedef typename
- detail::remove_reference<
- typename detail::remove_reference<
- It
- >::type::view_type
- >::type::value_type
+ typedef
+ typename detail::remove_reference<It>::type::value_type
type;
};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -16,6 +16,7 @@
#include <boost/fusion/support/internal/ref.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/deduce.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
#include <boost/fusion/support/internal/sequence_assign.hpp>
#include <boost/mpl/bool.hpp>
@@ -27,18 +28,21 @@
#include <boost/utility/enable_if.hpp>
#include <boost/fusion/view/single_view/detail/single_view_fwd.hpp>
+#include <boost/fusion/view/single_view/detail/at_impl.hpp>
+#include <boost/fusion/view/single_view/detail/value_at_impl.hpp>
#include <boost/fusion/view/single_view/detail/single_view_iterator.hpp>
#include <boost/fusion/view/single_view/detail/begin_impl.hpp>
-#include <boost/fusion/view/single_view/detail/end_impl.hpp>
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/single_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/single_view/detail/end_impl.hpp>
+#include <boost/fusion/view/single_view/detail/equal_to_impl.hpp>
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
+#include <boost/fusion/view/single_view/detail/prior_impl.hpp>
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
-#include <boost/fusion/view/single_view/detail/equal_to_impl.hpp>
namespace boost { namespace fusion
{
struct single_view_tag;
- struct forward_traversal_tag;
struct fusion_sequence_tag;
template <typename T>
@@ -49,13 +53,13 @@
typedef single_view_tag fusion_tag;
typedef fusion_sequence_tag tag;
- typedef forward_traversal_tag category;
+ typedef random_access_traversal_tag category;
typedef mpl::true_ is_view;
typedef mpl::int_<1> size;
#define BOOST_FUSION_SINGLE_VIEW_CTOR(COMBINATION,_)\
single_view(single_view COMBINATION view)\
- : val(BOOST_FUSION_FORWARD(single_view COMBINATION,view).val)\
+ : val(static_cast<single_view COMBINATION>(view).val)\
{}
BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SINGLE_VIEW_CTOR,_)
@@ -153,21 +157,37 @@
template<typename T>
struct make_single_view
{
- typedef
- single_view<
- typename traits::deduce<BOOST_FUSION_R_ELSE_CLREF(T)>::type
- >
- type;
+ typedef single_view<typename traits::deduce<T>::type> type;
};
};
template <typename T>
- inline typename result_of::make_single_view<T>::type
+ inline typename
+ result_of::make_single_view<BOOST_FUSION_R_ELSE_CLREF(T)>::type
make_single_view(BOOST_FUSION_R_ELSE_CLREF(T) val)
{
return typename result_of::make_single_view<T>::type(
BOOST_FUSION_FORWARD(T,val));
}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T, typename Seq>
+ //cschmidt: see https://svn.boost.org/trac/boost/ticket/3305
+# if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__GNUC__,<4)
+ typename lazy_disable_if<
+ is_const<T>
+ , result_of::make_single_view<T&>
+ >::type
+# else
+ typename result_of::make_single_view<T&>::type
+# endif
+ make_single_view(T& val)
+ {
+ return typename result_of::make_single_view<T&>::type(val);
+ }
+#endif
+
+ //TODO random access
}}
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -41,7 +41,7 @@
typedef typename
mpl::eval_if<
is_associative
- , mpl::inherit2<it_category,associative_sequence_tag>
+ , mpl::inherit2<it_category,associative_tag>
, mpl::identity<it_category>
>::type
category;
@@ -99,7 +99,7 @@
typedef typename
mpl::eval_if<
is_associative
- , mpl::inherit2<strictest_traversal,associative_sequence_tag>
+ , mpl::inherit2<strictest_traversal,associative_tag>
, mpl::identity<strictest_traversal>
>::type
category;
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp 2009-11-03 13:29:12 EST (Tue, 03 Nov 2009)
@@ -38,7 +38,6 @@
#include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
#include <boost/fusion/view/transform_view/detail/at_impl.hpp>
#include <boost/fusion/view/transform_view/detail/value_at_impl.hpp>
-
#include <boost/fusion/view/transform_view/detail/transform_view_iterator.hpp>
#include <boost/fusion/view/transform_view/detail/begin_impl.hpp>
#include <boost/fusion/view/transform_view/detail/end_impl.hpp>
@@ -96,7 +95,7 @@
typedef typename
mpl::eval_if<
is_associative
- , mpl::inherit2<strictest_traversal,associative_sequence_tag>
+ , mpl::inherit2<strictest_traversal,associative_tag>
, mpl::identity<strictest_traversal>
>::type
category;
@@ -172,7 +171,7 @@
typedef typename
mpl::eval_if<
is_associative
- , mpl::inherit2<seq_category,associative_sequence_tag>
+ , mpl::inherit2<seq_category,associative_tag>
, mpl::identity<seq_category>
>::type
category;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk