Boost logo

Boost-Commit :

From: chochlik_at_[hidden]
Date: 2008-05-10 07:06:55


Author: matus.chochlik
Date: 2008-05-10 07:06:54 EDT (Sat, 10 May 2008)
New Revision: 45259
URL: http://svn.boost.org/trac/boost/changeset/45259

Log:
Fixed things which caused compilation errors on gcc
Text files modified:
   sandbox/mirror/boost/mirror/algorithm/detail/common_iterator.hpp | 162 +++++++++++++++++++++++++++------------
   sandbox/mirror/libs/mirror/example/algorithms/begin_end.cpp | 8
   2 files changed, 115 insertions(+), 55 deletions(-)

Modified: sandbox/mirror/boost/mirror/algorithm/detail/common_iterator.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/algorithm/detail/common_iterator.hpp (original)
+++ sandbox/mirror/boost/mirror/algorithm/detail/common_iterator.hpp 2008-05-10 07:06:54 EDT (Sat, 10 May 2008)
@@ -35,6 +35,104 @@
 
 namespace detail {
 
+ template <
+ class ReflectedType,
+ class VariantTag,
+ class MetaObjectSequence,
+ class Position,
+ class BeginPos,
+ class EndPos,
+ class Direction,
+ class UnaryPredicate,
+ class Selector
+ >
+ struct meta_object_iterator_base_templ;
+
+ template <
+ class ReflectedType,
+ class VariantTag,
+ class MetaObjectSequence,
+ class DummyPosition,
+ class BeginPos,
+ class EndPos,
+ class Direction,
+ class UnaryPredicate,
+ class Selector,
+ int I
+ >
+ struct meta_object_iterator_base_templ_get_ioni_apply
+ {
+ typedef meta_object_iterator_base_templ<
+ ReflectedType,
+ VariantTag,
+ MetaObjectSequence,
+ typename mpl::int_<mpl::plus<
+ DummyPosition,
+ mpl::times<
+ Direction,
+ mpl::int_<I>
+ >
+ >::value>,
+ BeginPos,
+ EndPos,
+ Direction,
+ UnaryPredicate,
+ Selector
+ > next_iterator;
+
+ typedef typename mpl::apply<
+ UnaryPredicate,
+ typename deref<next_iterator>::type
+ >::type next_is_valid;
+
+ // TODO: this should be optimized.
+ typedef typename mpl::if_<
+ next_is_valid,
+ next_iterator,
+ typename mpl::apply<
+ typename next_iterator::get_next_iterator,
+ typename next_iterator::position
+ >::type
+ > ::type type;
+ };
+
+ template <
+ class ReflectedType,
+ class VariantTag,
+ class MetaObjectSequence,
+ class BeginPos,
+ class EndPos,
+ class Direction,
+ class UnaryPredicate,
+ class Selector,
+ int I
+ >
+ struct meta_object_iterator_base_templ_get_ioni_apply<
+ ReflectedType,
+ VariantTag,
+ MetaObjectSequence,
+ EndPos,
+ BeginPos,
+ EndPos,
+ Direction,
+ UnaryPredicate,
+ Selector,
+ I
+ >
+ {
+ typedef meta_object_iterator_base_templ<
+ ReflectedType,
+ VariantTag,
+ MetaObjectSequence,
+ EndPos,
+ BeginPos,
+ EndPos,
+ Direction,
+ UnaryPredicate,
+ Selector
+ > type;
+ };
+
         /** Forward declaration of iterator_pointee_selector
          */
         template <class MetaObjectSequence>
@@ -61,7 +159,7 @@
 
                 // the type meta_class_attribute
                 // that this iterator points to
- typedef typename Selector::apply<
+ typedef typename Selector::template apply<
                         ReflectedType,
                         VariantTag,
                         MetaObjectSequence,
@@ -123,57 +221,19 @@
                 {
 
                         template <typename DummyPosition>
- struct apply
- {
- typedef meta_object_iterator_base_templ<
- ReflectedType,
- VariantTag,
- MetaObjectSequence,
- typename mpl::int_<mpl::plus<
- DummyPosition,
- mpl::times<
- Direction,
- mpl::int_<I>
- >
- >::value>,
- BeginPos,
- EndPos,
- Direction,
- UnaryPredicate,
- Selector
- > next_iterator;
+ struct apply : meta_object_iterator_base_templ_get_ioni_apply<
+ ReflectedType,
+ VariantTag,
+ MetaObjectSequence,
+ DummyPosition,
+ BeginPos,
+ EndPos,
+ Direction,
+ UnaryPredicate,
+ Selector,
+ I
+ > { };
 
- typedef typename mpl::apply<
- UnaryPredicate,
- typename deref<next_iterator>::type
- >::type next_is_valid;
-
- // TODO: this should be optimized.
- typedef typename mpl::if_<
- next_is_valid,
- next_iterator,
- typename mpl::apply<
- typename next_iterator::get_next_iterator,
- typename next_iterator::position
- >::type
- > ::type type;
- };
-
- template <>
- struct apply<EndPos>
- {
- typedef meta_object_iterator_base_templ<
- ReflectedType,
- VariantTag,
- MetaObjectSequence,
- EndPos,
- BeginPos,
- EndPos,
- Direction,
- UnaryPredicate,
- Selector
- > type;
- };
                 };
 
                 struct get_initial_iterator : get_initial_or_next_iterator<0>{ };

Modified: sandbox/mirror/libs/mirror/example/algorithms/begin_end.cpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/algorithms/begin_end.cpp (original)
+++ sandbox/mirror/libs/mirror/example/algorithms/begin_end.cpp 2008-05-10 07:06:54 EDT (Sat, 10 May 2008)
@@ -212,7 +212,7 @@
         //
         bcout << "---------------------------------------------------" << endl;
         //
- typedef find_if<meta_T::all_attributes, is_even_attrib>::type n_0;
+ typedef mirror::find_if<meta_T::all_attributes, is_even_attrib>::type n_0;
         bcout << deref<n_0>::type::base_name() << ',' ;
         typedef next<n_0>::type n_2;
         bcout << deref<n_2>::type::base_name() << ',' ;
@@ -230,7 +230,7 @@
         //
         bcout << "---------------------------------------------------" << endl;
         //
- typedef find_if<meta_T::all_attributes, is_odd_attrib >::type m_1;
+ typedef mirror::find_if<meta_T::all_attributes, is_odd_attrib >::type m_1;
         bcout << deref<m_1>::type::base_name() << ',' ;
         typedef next<m_1>::type m_3;
         bcout << deref<m_3>::type::base_name() << ',' ;
@@ -247,7 +247,7 @@
         bcout << "---------------------------------------------------" << endl;
         //
         /*
- typedef reverse_find_if<meta_T::all_attributes, is_odd_attrib >::type q_7;
+ typedef mirror::reverse_find_if<meta_T::all_attributes, is_odd_attrib >::type q_7;
         bcout << deref<q_7>::type::base_name() << ',' ;
         typedef next<q_7>::type q_5;
         bcout << deref<q_5>::type::base_name() << ',' ;
@@ -264,7 +264,7 @@
         //
         bcout << "---------------------------------------------------" << endl;
         //
- typedef find_if<meta_T::all_attributes, is_integral_attrib >::type o_0;
+ typedef mirror::find_if<meta_T::all_attributes, is_integral_attrib >::type o_0;
         bcout << deref<o_0>::type::base_name() << ',' ;
         typedef next<o_0>::type o_1;
         bcout << deref<o_1>::type::base_name() << ',' ;


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