Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58200 - in sandbox/itl/boost: itl_xt/detail validate/std/algorithm
From: afojgo_at_[hidden]
Date: 2009-12-06 16:09:07


Author: jofaber
Date: 2009-12-06 16:09:06 EST (Sun, 06 Dec 2009)
New Revision: 58200
URL: http://svn.boost.org/trac/boost/changeset/58200

Log:
Portability adjustments for gcc. Stable {msvc-9.0}

 
Text files modified:
   sandbox/itl/boost/itl_xt/detail/bit_element_iterator.hpp | 11 ++++-------
   sandbox/itl/boost/validate/std/algorithm/find.hpp | 27 +++++++++++++++++----------
   2 files changed, 21 insertions(+), 17 deletions(-)

Modified: sandbox/itl/boost/itl_xt/detail/bit_element_iterator.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/detail/bit_element_iterator.hpp (original)
+++ sandbox/itl/boost/itl_xt/detail/bit_element_iterator.hpp 2009-12-06 16:09:06 EST (Sun, 06 Dec 2009)
@@ -235,7 +235,6 @@
 
 #ifdef BOOST_MSVC
 #pragma warning(push)
-#pragma warning(disable:4706) // assignment within conditional expression
 #pragma warning(disable:4146) // unary minus operator applied to unsigned type, result still unsigned
 #endif
 
@@ -371,12 +370,12 @@
         {
             half_type low_next, up_next;
             if(half-1 <= cur_pos)
- if(up_next = upper_next(value, cur_pos))
+ if((up_next = upper_next(value, cur_pos)))
                     return half + index32[(((up_next & -up_next) * factor)) >> shift];
                 else
                     return past;
             else
- if(low_next = lower_next(value, cur_pos))
+ if((low_next = lower_next(value, cur_pos)))
                     return index32[(((low_next & -low_next) * factor)) >> shift];
                 else if(half_type up_next = upper_next(value, cur_pos))
                     return half + index32[(((up_next & -up_next) * factor)) >> shift];
@@ -415,14 +414,12 @@
         {
             half_type up_prev, low_prev;
             if(half == cur_pos)
- // warning C4706: assignment within conditional expression
- // This is intentional here.
- if(low_prev = static_cast<half_type>(lower_mask & value))
+ if((low_prev = static_cast<half_type>(lower_mask & value)))
                     return index32[((high_bit(low_prev) * factor)) >> shift];
                 else
                     return ante;
             else if(cur_pos < half || !(up_prev = upper_previous(value, cur_pos)))
- if(low_prev = lower_previous(value,cur_pos))
+ if((low_prev = lower_previous(value,cur_pos)))
                     return index32[((high_bit(low_prev) * factor)) >> shift];
                 else
                     return ante;

Modified: sandbox/itl/boost/validate/std/algorithm/find.hpp
==============================================================================
--- sandbox/itl/boost/validate/std/algorithm/find.hpp (original)
+++ sandbox/itl/boost/validate/std/algorithm/find.hpp 2009-12-06 16:09:06 EST (Sun, 06 Dec 2009)
@@ -70,7 +70,8 @@
     
     TargetT operator()(const AtomicT& source)const
     {
- AtomicT::const_reverse_iterator found = std::find(source.rbegin(), source.rend(), _comparand);
+ typename AtomicT::const_reverse_iterator found
+ = std::find(source.rbegin(), source.rend(), _comparand);
         if(found == source.rend())
             return neutron<TargetT>::value();
         else
@@ -79,7 +80,7 @@
 
     TargetT operator()(const SegmentalT& source)const
     {
- SegmentalT::element_const_reverse_iterator found
+ typename SegmentalT::element_const_reverse_iterator found
             = std::find(source.elements_rbegin(), source.elements_rend(), _comparand);
         if(found == source.elements_rend())
             return neutron<TargetT>::value();
@@ -110,7 +111,8 @@
     
     TargetT operator()(const AtomicT& source)const
     {
- AtomicT::const_iterator found = std::lower_bound(source.begin(), source.end(), _comparand);
+ typename AtomicT::const_iterator found
+ = std::lower_bound(source.begin(), source.end(), _comparand);
         if(found == source.end())
             return neutron<TargetT>::value();
         else
@@ -119,7 +121,8 @@
 
     TargetT operator()(const SegmentalT& source)const
     {
- SegmentalT::element_const_iterator found = std::lower_bound(source.elements_begin(), source.elements_end(), _comparand);
+ typename SegmentalT::element_const_iterator found
+ = std::lower_bound(source.elements_begin(), source.elements_end(), _comparand);
         if(found == source.elements_end())
             return neutron<TargetT>::value();
         else
@@ -147,7 +150,8 @@
     
     TargetT operator()(const AtomicT& source)const
     {
- AtomicT::const_reverse_iterator found = std::lower_bound(source.rbegin(), source.rend(), _comparand);
+ typename AtomicT::const_reverse_iterator found
+ = std::lower_bound(source.rbegin(), source.rend(), _comparand);
         if(found == source.rend())
             return neutron<TargetT>::value();
         else
@@ -156,7 +160,7 @@
 
     TargetT operator()(const SegmentalT& source)const
     {
- SegmentalT::element_const_reverse_iterator found
+ typename SegmentalT::element_const_reverse_iterator found
             = std::lower_bound(source.elements_rbegin(), source.elements_rend(), _comparand);
         if(found == source.elements_rend())
             return neutron<TargetT>::value();
@@ -187,7 +191,8 @@
     
     TargetT operator()(const AtomicT& source)const
     {
- AtomicT::const_iterator found = std::upper_bound(source.begin(), source.end(), _comparand);
+ typename AtomicT::const_iterator found
+ = std::upper_bound(source.begin(), source.end(), _comparand);
         if(found == source.end())
             return neutron<TargetT>::value();
         else
@@ -196,7 +201,8 @@
 
     TargetT operator()(const SegmentalT& source)const
     {
- SegmentalT::element_const_iterator found = std::upper_bound(source.elements_begin(), source.elements_end(), _comparand);
+ typename SegmentalT::element_const_iterator found
+ = std::upper_bound(source.elements_begin(), source.elements_end(), _comparand);
         if(found == source.elements_end())
             return neutron<TargetT>::value();
         else
@@ -224,7 +230,8 @@
     
     TargetT operator()(const AtomicT& source)const
     {
- AtomicT::const_reverse_iterator found = std::upper_bound(source.rbegin(), source.rend(), _comparand);
+ typename AtomicT::const_reverse_iterator found
+ = std::upper_bound(source.rbegin(), source.rend(), _comparand);
         if(found == source.rend())
             return neutron<TargetT>::value();
         else
@@ -233,7 +240,7 @@
 
     TargetT operator()(const SegmentalT& source)const
     {
- SegmentalT::element_const_reverse_iterator found
+ typename SegmentalT::element_const_reverse_iterator found
             = std::upper_bound(source.elements_rbegin(), source.elements_rend(), _comparand);
         if(found == source.elements_rend())
             return neutron<TargetT>::value();


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