Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63397 - sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch
From: cppljevans_at_[hidden]
Date: 2010-06-27 15:01:15


Author: cppljevans
Date: 2010-06-27 15:01:14 EDT (Sun, 27 Jun 2010)
New Revision: 63397
URL: http://svn.boost.org/trac/boost/changeset/63397

Log:
replace_source_with_target_ptr.hpp:
  Add specializations to handle nullary functors.
multiple_dispatch/apply_unpack.hpp:
  Use:
    #ifndef APPLY_UNPACK_DEMO_UNCHECK_ARGS
  instead of:
    #if 0
  to enable swithing demo of need for arg checking
  from test driver.

Text files modified:
   sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/apply_unpack.hpp | 2
   sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/replace_source_with_target_ptr.hpp | 65 +++++++++++++++++++++++++++++++++++++--
   2 files changed, 62 insertions(+), 5 deletions(-)

Modified: sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/apply_unpack.hpp
==============================================================================
--- sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/apply_unpack.hpp (original)
+++ sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/apply_unpack.hpp 2010-06-27 15:01:14 EDT (Sun, 27 Jun 2010)
@@ -113,7 +113,7 @@
       )
     {
         return
- #if 1
+ #ifndef APPLY_UNPACK_DEMO_UNCHECK_ARGS
           apply_ftor_check_args
           ( a_functor
           , a_args.template project<Indices>()...

Modified: sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/replace_source_with_target_ptr.hpp
==============================================================================
--- sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/replace_source_with_target_ptr.hpp (original)
+++ sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/replace_source_with_target_ptr.hpp 2010-06-27 15:01:14 EDT (Sun, 27 Jun 2010)
@@ -146,7 +146,8 @@
           typedef
         void_ptr_array
         < mpl::package
- < ArgsSource...>
+ < ArgsSource...
+ >
>
       super_type
       ;
@@ -166,9 +167,41 @@
           ( a_self
           )
         {}
- private:
+ private:
+ ptrs_target_source(void)
+ {}
+ };
+ template
+ <
+ >
+ struct
+ptrs_target_source
+ < mpl::package
+ <
+ >
+ >
+ /**@brief
+ * Initial value of a ptrs_target_source, i.e.
+ * before any conversion of ArgsSource pointers
+ * to Target pointers.
+ */
+ : void_ptr_array
+ < mpl::package
+ <
+ >
+ >
+ {
+ typedef
+ void_ptr_array
+ < mpl::package
+ <
+ >
+ >
+ super_type
+ ;
+
       ptrs_target_source(void)
- ;
+ {}
   };
 
   template
@@ -184,7 +217,7 @@
   ( ArgsSource&...
     a_args
   )
- /**Ebrief
+ /**@brief
    * Convenience function to create an
    * "initial" ptrs_target_source, i.e.
    * one that contains no Target pointers.
@@ -203,6 +236,30 @@
      return result_args;
   }
 
+ ptrs_target_source
+ < mpl::package
+ < //No target pointers.
+ >
+ >
+mk_ptrs_source
+ ( void
+ )
+ /**@brief
+ * Convenience function to create an
+ * "initial" ptrs_target_source, i.e.
+ * one that contains no Target pointers.
+ */
+ {
+ ptrs_target_source
+ < mpl::package
+ <
+ >
+ >
+ result_args
+ ;
+ return result_args;
+ }
+
   template
   < typename... ArgsTarget
   , typename... ArgsSource


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