Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66216 - in sandbox/function/boost/function: . detail
From: dsaritz_at_[hidden]
Date: 2010-10-27 12:27:31


Author: psiha
Date: 2010-10-27 12:27:28 EDT (Wed, 27 Oct 2010)
New Revision: 66216
URL: http://svn.boost.org/trac/boost/changeset/66216

Log:
Compilation error fixes.
Text files modified:
   sandbox/function/boost/function/detail/safe_bool.hpp | 1 +
   sandbox/function/boost/function/function_base.hpp | 36 +++++++++++++++++++++---------------
   2 files changed, 22 insertions(+), 15 deletions(-)

Modified: sandbox/function/boost/function/detail/safe_bool.hpp
==============================================================================
--- sandbox/function/boost/function/detail/safe_bool.hpp (original)
+++ sandbox/function/boost/function/detail/safe_bool.hpp 2010-10-27 12:27:28 EDT (Wed, 27 Oct 2010)
@@ -20,6 +20,7 @@
 #define safe_bool_hpp__7E590FD4_CE99_442C_82DB_8DC9CB7D3886
 //------------------------------------------------------------------------------
 #include "boost/mpl/bool.hpp"
+#include "boost/mpl/if.hpp"
 //------------------------------------------------------------------------------
 namespace boost
 {

Modified: sandbox/function/boost/function/function_base.hpp
==============================================================================
--- sandbox/function/boost/function/function_base.hpp (original)
+++ sandbox/function/boost/function/function_base.hpp 2010-10-27 12:27:28 EDT (Wed, 27 Oct 2010)
@@ -176,7 +176,7 @@
             void construct( pointer const ptr, T const & source ) { new ( ptr ) T( source ); }
             void destroy ( pointer const ptr ) { ptr->~T(); }
 
- static size_type max_size() { return std::numeric_limits<size_type>::max() / sizeof( T ); }
+ static size_type max_size() { return (std::numeric_limits<size_type>::max)() / sizeof( T ); }
         };
 
         typedef fallocator<void *> dummy_allocator;
@@ -704,11 +704,14 @@
 
           static void assign( Functor const & functor, function_buffer & out_buffer, OriginalAllocator source_allocator )
           {
- typedef ::boost::type_traits::ice_and
- <
- ::boost::has_nothrow_copy<Functor >::value,
- ::boost::has_nothrow_copy<OriginalAllocator>::value
- > does_not_need_guard_t;
+ typedef mpl::bool_
+ <
+ ::boost::type_traits::ice_and
+ <
+ ::boost::has_nothrow_copy<Functor >::value,
+ ::boost::has_nothrow_copy<OriginalAllocator>::value
+ >::value
+ > does_not_need_guard_t;
 
               typedef typename mpl::if_
               <
@@ -1623,16 +1626,19 @@
         // This can/should be rewritten because the small-object-optimization
         // condition is too strict (requires a trivial destructor which is not
         // needed for a no fail assignment).
- typedef ::boost::type_traits::ice_and
+ typedef mpl::bool_
+ <
+ ::boost::type_traits::ice_and
+ <
+ functor_traits<FunctionObj>::allowsSmallObjectOptimization,
+ ::boost::type_traits::ice_or
                 <
- functor_traits<FunctionObj>::allowsSmallObjectOptimization,
- ::boost::type_traits::ice_or
- <
- ::boost::has_nothrow_copy<FunctionObj>::value,
- ::boost::has_trivial_copy<FunctionObj>::value,
- ::boost::detail::function::is_msvc_exception_specified_function_pointer<FunctionObj>::value
- >::value
- > has_no_fail_assignement_t;
+ ::boost::has_nothrow_copy<FunctionObj>::value,
+ ::boost::has_trivial_copy<FunctionObj>::value,
+ ::boost::detail::function::is_msvc_exception_specified_function_pointer<FunctionObj>::value
+ >::value
+ >::value
+ > has_no_fail_assignement_t;
 
         actual_assign<EmptyHandler>
         (


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