Boost logo

Boost-Commit :

From: oryol_at_[hidden]
Date: 2008-07-24 23:07:49


Author: jeremypack
Date: 2008-07-24 23:07:48 EDT (Thu, 24 Jul 2008)
New Revision: 47777
URL: http://svn.boost.org/trac/boost/changeset/47777

Log:
Fixes for adding member of functions of base classes.

Text files modified:
   sandbox/boost/reflection/impl/reflection.hpp | 3 ++-
   sandbox/boost/reflection/impl/reflector_functions.hpp | 12 ++++++------
   sandbox/boost/reflection/impl/reflector_parameter_functions.hpp | 8 ++++----
   3 files changed, 12 insertions(+), 11 deletions(-)

Modified: sandbox/boost/reflection/impl/reflection.hpp
==============================================================================
--- sandbox/boost/reflection/impl/reflection.hpp (original)
+++ sandbox/boost/reflection/impl/reflection.hpp 2008-07-24 23:07:48 EDT (Thu, 24 Jul 2008)
@@ -69,7 +69,8 @@
   #define BOOST_PP_FILENAME_1 \
     <boost/reflection/impl/reflector_functions.hpp>
   #include BOOST_PP_ITERATE()
- reflector& function(void (T::*func)(), Info info) {
+ template <class A>
+ reflector& function(void (A::*func)(), Info info) {
 #ifdef BOOST_REFLECTION_WITH_PARAMETER_INFO
       function_info f(reflections::type_info_handler<TypeInfo,
                         void (*)()>::get_class_type(), info, false);

Modified: sandbox/boost/reflection/impl/reflector_functions.hpp
==============================================================================
--- sandbox/boost/reflection/impl/reflector_functions.hpp (original)
+++ sandbox/boost/reflection/impl/reflector_functions.hpp 2008-07-24 23:07:48 EDT (Thu, 24 Jul 2008)
@@ -53,9 +53,9 @@
 // This version of the function is for reflecting functions that have
 // return values - so that the name of the return value can be set.
 template <class ReturnValue BOOST_PP_COMMA_IF(N)
- BOOST_PP_ENUM_PARAMS(N, class Param)>
+ BOOST_PP_ENUM_PARAMS(N, class Param), class A>
 #ifdef BOOST_REFLECTION_WITH_PARAMETER_INFO
-reflector& function(ReturnValue (T::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
+reflector& function(ReturnValue (A::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
              Info info, ParameterInfo i_return BOOST_PP_COMMA_IF(N)
              BOOST_PP_ENUM_PARAMS(N, ParameterInfo i)) {
   // Create the function_info for this function.
@@ -67,7 +67,7 @@
   // Add the ParameterInfo for the return type.
   f.parameter_info_.push_back(i_return);
 #else
-reflector& function(ReturnValue (T::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
+reflector& function(ReturnValue (A::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
                     Info info) {
     // Create the function_info for this function.
   function_info f(reflections::type_info_handler<TypeInfo,
@@ -96,9 +96,9 @@
 // This version of the function is for reflecting functions that have
 // no return value.
 template <class ParamFirst BOOST_PP_COMMA_IF(N)
- BOOST_PP_ENUM_PARAMS(N, class Param)>
+ BOOST_PP_ENUM_PARAMS(N, class Param), class A>
 #ifdef BOOST_REFLECTION_WITH_PARAMETER_INFO
-reflector& function(void (T::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
+reflector& function(void (A::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
                              BOOST_PP_ENUM_PARAMS(N, Param)),
              Info info, ParameterInfo i_first BOOST_PP_COMMA_IF(N)
              BOOST_PP_ENUM_PARAMS(N, ParameterInfo i)) {
@@ -109,7 +109,7 @@
   f.parameter_info_.push_back(i_first);
   BOOST_REFLECTION_PUSH_PARAMETER_INFO(f, N);
 #else
-reflector& function(void (T::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
+reflector& function(void (A::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
                              BOOST_PP_ENUM_PARAMS(N, Param)),
                     Info info) {
    function_info f(reflections::type_info_handler<TypeInfo,

Modified: sandbox/boost/reflection/impl/reflector_parameter_functions.hpp
==============================================================================
--- sandbox/boost/reflection/impl/reflector_parameter_functions.hpp (original)
+++ sandbox/boost/reflection/impl/reflector_parameter_functions.hpp 2008-07-24 23:07:48 EDT (Thu, 24 Jul 2008)
@@ -47,8 +47,8 @@
 // This version of the function is for reflecting functions that have
 // return values - so that the name of the return value can be set.
 template <class ReturnValue BOOST_PP_COMMA_IF(N)
- BOOST_PP_ENUM_PARAMS(N, class Param)>
-reflector& function(ReturnValue (T::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
+ BOOST_PP_ENUM_PARAMS(N, class Param), class A>
+reflector& function(ReturnValue (A::*func)(BOOST_PP_ENUM_PARAMS(N, Param)),
              Info info, ParameterInfo i_return BOOST_PP_COMMA_IF(N)
              BOOST_PP_ENUM_PARAMS(N, ParameterInfo i)) {
   // Create the function_info for this function.
@@ -82,8 +82,8 @@
 // This version of the function is for reflecting functions that have
 // no return value.
 template <class ParamFirst BOOST_PP_COMMA_IF(N)
- BOOST_PP_ENUM_PARAMS(N, class Param)>
-reflector& function(void (T::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
+ BOOST_PP_ENUM_PARAMS(N, class Param), class A>
+reflector& function(void (A::*func)(ParamFirst p_first BOOST_PP_COMMA_IF(N)
                              BOOST_PP_ENUM_PARAMS(N, Param)),
              Info info, ParameterInfo i_first BOOST_PP_COMMA_IF(N)
              BOOST_PP_ENUM_PARAMS(N, ParameterInfo i)) {


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