Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66366 - sandbox/function/boost/function
From: dsaritz_at_[hidden]
Date: 2010-11-02 17:59:27


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

Log:
Warning fixes.
Text files modified:
   sandbox/function/boost/function/function_base.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 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 17:59:16 EDT (Tue, 02 Nov 2010)
@@ -160,10 +160,10 @@
         public:
             typedef T value_type;
 
- typedef value_type * pointer ;
- typedef value_type & reference ;
- typedef value_type const * const_pointer ;
- typedef value_type const & const_reference;
+ typedef value_type * pointer ;
+ typedef value_type & reference ;
+ typedef typename add_const<value_type>::type * const_pointer ;
+ typedef typename add_const<value_type>::type & const_reference;
 
             typedef std::size_t size_type ;
             typedef std::ptrdiff_t difference_type;
@@ -190,8 +190,8 @@
             void deallocate( pointer const ptr , size_type /*count*/ ) { deallocate( ptr ); }
             void deallocate( pointer const ptr ) { ::operator delete( ptr ); }
 
- void construct( pointer const ptr, T const & source ) { new ( ptr ) T( source ); }
- void destroy ( pointer const ptr ) { ptr->~T(); ignore_unused_variable_warning( ptr ); }
+ void construct( pointer const ptr, const_reference source ) { new ( ptr ) T( source ); }
+ void destroy ( pointer const ptr ) { ptr->~T(); ignore_unused_variable_warning( ptr ); }
 
             static size_type max_size() { return (std::numeric_limits<size_type>::max)() / sizeof( T ); }
         };


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