Boost logo

Boost-Commit :

From: chochlik_at_[hidden]
Date: 2008-06-04 13:41:08


Author: matus.chochlik
Date: 2008-06-04 13:41:07 EDT (Wed, 04 Jun 2008)
New Revision: 46129
URL: http://svn.boost.org/trac/boost/changeset/46129

Log:
Fixed things which caused compilation errors on gcc
Text files modified:
   sandbox/mirror/boost/mirror/traversal.hpp | 26 ++++++++++++--------------
   sandbox/mirror/boost/mirror/visitors/sample.hpp | 13 +++++++------
   2 files changed, 19 insertions(+), 20 deletions(-)

Modified: sandbox/mirror/boost/mirror/traversal.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/traversal.hpp (original)
+++ sandbox/mirror/boost/mirror/traversal.hpp 2008-06-04 13:41:07 EDT (Wed, 04 Jun 2008)
@@ -45,12 +45,12 @@
                         : visitor(_visitor)
                         , ptr_to_inst(_ptr_to_inst)
                         {
- visitor.enter_attributes<MetaClass, MetaAttributes>();
+ visitor.enter_attributes(MetaClass(), MetaAttributes());
                         }
         
                         ~attribute_traversal(void)
                         {
- visitor.leave_attributes<MetaClass, MetaAttributes>();
+ visitor.leave_attributes(MetaClass(), MetaAttributes());
                         }
         
                         template <class MetaAttribute>
@@ -112,12 +112,12 @@
                         : visitor(_visitor)
                         , ptr_to_inst(_ptr_to_inst)
                         {
- visitor.enter_base_classes<MetaClass>();
+ visitor.enter_base_classes(MetaClass());
                         }
         
                         ~base_class_traversal(void)
                         {
- visitor.leave_base_classes<MetaClass>();
+ visitor.leave_base_classes(MetaClass());
                         }
         
                         template <class MetaInheritance>
@@ -182,19 +182,18 @@
                 typename MetaClass::reflected_type* ptr_to_inst
         )
         {
- typedef MetaClass meta_class;
- meta_class mc;
+ MetaClass mc;
                 // enter the type
                 visitor.get().enter_type(mc);
                 // visit the instance
                 visitor.get().visit_instance(mc, ptr_to_inst);
                 // go through the base classes
- for_each<typename meta_class::base_classes>(
- ref(show_bases_to(visitor, ptr_to_inst))
+ for_each<typename MetaClass::base_classes>(
+ show_bases_to(visitor, ptr_to_inst)
                 );
                 // go through the own class' attributes
- for_each<typename meta_class::attributes>(
- ref(show_attribs_to(visitor, ptr_to_inst))
+ for_each<typename MetaClass::attributes>(
+ show_attribs_to(visitor, ptr_to_inst)
                 );
                 // leave the type
                 visitor.get().leave_type(mc);
@@ -233,15 +232,14 @@
                 typename MetaClass::reflected_type* ptr_to_inst
         )
         {
- typedef MetaClass meta_class;
- meta_class mc;
+ MetaClass mc;
                 // enter the type
                 visitor.get().enter_type(mc);
                 // visit the instance
                 visitor.get().visit_instance(mc, ptr_to_inst);
                 // go through all of the class' attributes
- for_each<typename meta_class::all_attributes>(
- ref(show_attribs_to(visitor, ptr_to_inst))
+ for_each<typename MetaClass::all_attributes>(
+ show_attribs_to(visitor, ptr_to_inst)
                 );
                 // leave the type
                 visitor.get().leave_type(mc);

Modified: sandbox/mirror/boost/mirror/visitors/sample.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/visitors/sample.hpp (original)
+++ sandbox/mirror/boost/mirror/visitors/sample.hpp 2008-06-04 13:41:07 EDT (Wed, 04 Jun 2008)
@@ -19,6 +19,7 @@
 #include <boost/mirror/traits/reflects_global_scope.hpp>
 // the base fallback visitor implementation
 #include <boost/mirror/visitors/fallback.hpp>
+#include <boost/mirror/algorithm/size.hpp>
 //
 //
 #include <boost/type_traits/is_fundamental.hpp>
@@ -68,9 +69,9 @@
         }
 
         template <class MetaClass>
- inline void enter_base_classes(void){ }
+ inline void enter_base_classes(MetaClass){ }
         template <class MetaClass>
- inline void leave_base_classes(void){ }
+ inline void leave_base_classes(MetaClass){ }
 
 
         // enter a base class
@@ -103,12 +104,12 @@
 
 
         template <class MetaClass, class MetaAttributes>
- void enter_attributes(void)
+ void enter_attributes(MetaClass, MetaAttributes)
         {
                 using namespace ::std;
                 using namespace ::boost;
                 if(
- !is_fundamental<MetaClass::reflected_type>::value &&
+ !is_fundamental<typename MetaClass::reflected_type>::value &&
                         (mirror::size<MetaAttributes>::value > 0)
                 )
                 {
@@ -121,12 +122,12 @@
         }
 
         template <class MetaClass, class MetaAttributes>
- inline void leave_attributes(void)
+ void leave_attributes(MetaClass, MetaAttributes)
         {
                 using namespace ::std;
                 using namespace ::boost;
                 if(
- !is_fundamental<MetaClass::reflected_type>::value &&
+ !is_fundamental<typename MetaClass::reflected_type>::value &&
                         (mirror::size<MetaAttributes>::value > 0)
                 )
                 {


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