Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64092 - in sandbox/SOC/2009/fusion/boost/fusion: support support/internal view/detail view/joint_view view/transform_view view/transform_view/detail view/zip_view
From: mr.chr.schmidt_at_[hidden]
Date: 2010-07-17 09:12:46


Author: cschmidt
Date: 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
New Revision: 64092
URL: http://svn.boost.org/trac/boost/changeset/64092

Log:
fixes and optimizations
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp | 4 ++--
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp | 14 +++++++-------
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp | 12 +++++-------
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp | 3 +--
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp | 6 +++---
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp | 7 +++----
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp | 2 +-
   7 files changed, 22 insertions(+), 26 deletions(-)

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 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -26,7 +26,7 @@
     {};
 
     //cschmidt: to ensure full compatibility between fusion and mpl iterators,
- //the tags should inheritate the corresponding mpl tags.
+ //the tags should inherit the corresponding mpl tags.
     //Fusion tags may be used as template arguments for iterator base classes
     //(e.g. fusion::iterator_facade), therefore emulate the mpl tags
     //(3.4.2/2 !).
@@ -67,7 +67,7 @@
     {
         typedef mpl::random_access_iterator_tag::tag tag;
         typedef mpl::random_access_iterator_tag::value_type value_type;
- typedef bidirectional_traversal_tag type;
+ typedef random_access_traversal_tag type;
         BOOST_STATIC_CONSTANT(
                   value_type,
                   value=mpl::random_access_iterator_tag::value);

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -78,12 +78,12 @@
                 " - assert expression: " BOOST_PP_STRINGIZE(PRED))
 # endif
 #else
-# define BOOST_FUSION_MPL_ASSERT(PRED) (void)(0)
-# define BOOST_FUSION_MPL_ASSERT_NOT(PRED) (void)(0)
-# define BOOST_FUSION_STATIC_ASSERT(PRED) (void)(0)
-# define BOOST_FUSION_MPL_ASSERT_MSG(PRED,MESSAGE) (void)(0)
-# define BOOST_FUSION_MPL_ASSERT_NOT_MSG(PRED,MESSAGE) (void)(0)
-# define BOOST_FUSION_STATIC_ASSERT_MSG(PRED,MESSAGE) (void)(0)
+# define BOOST_FUSION_MPL_ASSERT(PRED) enum {}
+# define BOOST_FUSION_MPL_ASSERT_NOT(PRED) enum {}
+# define BOOST_FUSION_STATIC_ASSERT(PRED) enum {}
+# define BOOST_FUSION_MPL_ASSERT_MSG(PRED,MESSAGE) enum {}
+# define BOOST_FUSION_MPL_ASSERT_NOT_MSG(PRED,MESSAGE) enum {}
+# define BOOST_FUSION_STATIC_ASSERT_MSG(PRED,MESSAGE) enum {}
 #endif
 
 #define BOOST_FUSION_INDEX_CHECK(INDEX,MAX) \
@@ -94,7 +94,7 @@
             "( [0..." BOOST_PP_STRINGIZE(MAX) ") )" \
     )
 #define BOOST_FUSION_TAG_CHECK(TYPE,TAG) \
- BOOST_FUSION_MPL_ASSERT((is_same<typename traits::tag_of<TYPE>::type,TAG>));
+ BOOST_FUSION_MPL_ASSERT((is_same<typename traits::tag_of<TYPE>::type,TAG>))
 
 #ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
 # include <boost/fusion/support/tag_of_fwd.hpp>

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -118,13 +118,11 @@
         }
 
         typedef typename remove_reference<T>::type non_ref_t;
- mutable typename
- mpl::if_<
- traits::is_view<T>
- , typename remove_const<non_ref_t>::type
- , non_ref_t*
- >::type
- t;
+ mutable typename mpl::if_<
+ traits::is_view<T>
+ , typename remove_const<non_ref_t>::type
+ , non_ref_t*
+ >::type t;
     };
 }}}
 

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 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -22,7 +22,6 @@
 #include <boost/mpl/plus.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/inherit.hpp>
-#include <boost/mpl/identity.hpp>
 #include <boost/mpl/and.hpp>
 
 #include <boost/fusion/view/joint_view/detail/joint_view_fwd.hpp>
@@ -63,7 +62,7 @@
                   , traits::is_associative<seq2_type>
>
               , mpl::inherit2<forward_traversal_tag,associative_tag>
- , mpl::identity<forward_traversal_tag>
+ , forward_traversal_tag
>::type
         category;
         typedef joint_view_tag fusion_tag;

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 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -27,7 +27,7 @@
         typedef typename
             mpl::eval_if<
                 traits::is_random_access<it_type>
- , mpl::identity<random_access_traversal_tag>
+ , random_access_traversal_tag
               , mpl::if_<
                     traits::is_bidirectional<it_type>
                   , bidirectional_traversal_tag
@@ -42,7 +42,7 @@
             mpl::eval_if<
                 is_associative
               , mpl::inherit2<it_category,associative_tag>
- , mpl::identity<it_category>
+ , it_category
>::type
         category;
 
@@ -100,7 +100,7 @@
             mpl::eval_if<
                 is_associative
               , mpl::inherit2<strictest_traversal,associative_tag>
- , mpl::identity<strictest_traversal>
+ , 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 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -28,7 +28,6 @@
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/eval_if.hpp>
 #include <boost/mpl/inherit.hpp>
-#include <boost/mpl/identity.hpp>
 #include <boost/mpl/bool.hpp>
 #ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
 # include <boost/mpl/equal_to.hpp>
@@ -96,7 +95,7 @@
             mpl::eval_if<
                 is_associative
               , mpl::inherit2<strictest_traversal,associative_tag>
- , mpl::identity<strictest_traversal>
+ , strictest_traversal
>::type
         category;
         typedef typename result_of::size<seq1_type>::type size;
@@ -160,7 +159,7 @@
         typedef typename
             mpl::eval_if<
                 traits::is_random_access<seq_type>
- , mpl::identity<random_access_traversal_tag>
+ , random_access_traversal_tag
               , mpl::if_<
                     traits::is_bidirectional<seq_type>
                   , bidirectional_traversal_tag
@@ -174,7 +173,7 @@
             mpl::eval_if<
                 is_associative
               , mpl::inherit2<seq_category,associative_tag>
- , mpl::identity<seq_category>
+ , seq_category
>::type
         category;
         typedef typename result_of::size<seq_type>::type size;

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp 2010-07-17 09:12:44 EDT (Sat, 17 Jul 2010)
@@ -159,7 +159,7 @@
             mpl::eval_if<
                 result_of::size<Seqs>
               , detail::min_size<real_seqs>
- , mpl::identity<mpl::int_<0> >
+ , mpl::int_<0>
>::type
         size;
 


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