Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68626 - sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch
From: cppljevans_at_[hidden]
Date: 2011-02-03 13:36:28


Author: cppljevans
Date: 2011-02-03 13:36:26 EST (Thu, 03 Feb 2011)
New Revision: 68626
URL: http://svn.boost.org/trac/boost/changeset/68626

Log:
WHAT:
  Use auto& instead of auto in operator()(mpl::integral_c...)
WHY:
  Otherwise, apparently, the auto is not a ref, and thus
  causes non-const value and probably an unneeded copy.

Text files modified:
   sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/reifier_switch.hpp | 10 +++++-----
   1 files changed, 5 insertions(+), 5 deletions(-)

Modified: sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/reifier_switch.hpp
==============================================================================
--- sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/reifier_switch.hpp (original)
+++ sandbox/variadic_templates/boost/composite_storage/pack/multiple_dispatch/reifier_switch.hpp 2011-02-03 13:36:26 EST (Thu, 03 Feb 2011)
@@ -70,9 +70,9 @@
       , HeadAbstract
       , TailAbstract...
>
- now_tar_src_t
+ now_tar_src_type
     ;
- now_tar_src_t*
+ now_tar_src_type*
     my_tar_src
     ;
       HeadAbstract&
@@ -80,7 +80,7 @@
     ;
     reifier_switch
       ( ReifyApply const& a_reify
- , now_tar_src_t* a_ptrs_tar_src
+ , now_tar_src_type* a_ptrs_tar_src
       )
     : my_reify(a_reify)
     , my_tar_src(a_ptrs_tar_src)
@@ -118,7 +118,7 @@
         return my_reify(next_tar_src_p);
     }
     
- public:
+ public:
       template
       < case_type CaseValue
>
@@ -128,7 +128,7 @@
       )const
     {
         index_type const index_concrete=index_type(CaseValue);
- auto a_tail_concrete=my_head_abstract.template project<index_concrete>();
+ auto& a_tail_concrete=my_head_abstract.template project<index_concrete>();
         return this->push_back_concrete(a_tail_concrete);
     }
         


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