Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66362 - sandbox/function/boost/function
From: dsaritz_at_[hidden]
Date: 2010-11-02 15:59:16


Author: psiha
Date: 2010-11-02 15:59:12 EDT (Tue, 02 Nov 2010)
New Revision: 66362
URL: http://svn.boost.org/trac/boost/changeset/66362

Log:
Removed the BOOST_FUNCTION_TARGET_FIX macro because now it only caused unnecessary copy-constructor calls.
Text files modified:
   sandbox/function/boost/function/function_base.hpp | 6 ------
   sandbox/function/boost/function/function_template.hpp | 12 ++++++------
   2 files changed, 6 insertions(+), 12 deletions(-)

Modified: sandbox/function/boost/function/function_base.hpp
==============================================================================
--- sandbox/function/boost/function/function_base.hpp (original)
+++ sandbox/function/boost/function/function_base.hpp 2010-11-02 15:59:12 EDT (Tue, 02 Nov 2010)
@@ -110,12 +110,6 @@
 #endif
 
 
-#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
-# define BOOST_FUNCTION_TARGET_FIX(x) x
-#else
-# define BOOST_FUNCTION_TARGET_FIX(x)
-#endif // not MSVC
-
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0)
 # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \
       typename ::boost::enable_if_c<(::boost::type_traits::ice_not< \

Modified: sandbox/function/boost/function/function_template.hpp
==============================================================================
--- sandbox/function/boost/function/function_template.hpp (original)
+++ sandbox/function/boost/function/function_template.hpp 2010-11-02 15:59:12 EDT (Tue, 02 Nov 2010)
@@ -263,7 +263,7 @@
     template <typename Functor>
     BOOST_FUNCTION_FUNCTION
     (
- Functor BOOST_FUNCTION_TARGET_FIX(const &) f
+ Functor const & f
         #ifndef BOOST_NO_SFINAE
             ,typename enable_if_c<
             (boost::type_traits::ice_not<
@@ -278,7 +278,7 @@
     template <typename Functor, typename Allocator>
     BOOST_FUNCTION_FUNCTION
     (
- Functor BOOST_FUNCTION_TARGET_FIX(const &) f,
+ Functor const & f,
         Allocator const a
         #ifndef BOOST_NO_SFINAE
             ,typename enable_if_c<
@@ -372,23 +372,23 @@
         return *this;
     }
 
- template<typename Functor>
+ template <typename Functor>
 #ifndef BOOST_NO_SFINAE
     typename enable_if_c<
                (boost::type_traits::ice_not<
                  (is_integral<Functor>::value)>::value),
                BOOST_FUNCTION_FUNCTION&>::type
 #else
- BOOST_FUNCTION_FUNCTION&
+ BOOST_FUNCTION_FUNCTION &
 #endif
- operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
+ operator=( Functor const & f )
     {
       this->assign(f);
       return *this;
     }
 
     template <typename FunctionObj, typename Allocator>
- void assign( FunctionObj BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator const a )
+ void assign( FunctionObj const & f, Allocator const a )
     {
         this->do_assign<false, FunctionObj>( f, a );
     }


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