diff DEPENDENCIES/generic/include/boost/icl/interval_base_map.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/icl/interval_base_map.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/icl/interval_base_map.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -215,13 +215,6 @@
         BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>));
     }
 
-    /** Copy assignment operator */
-    interval_base_map& operator = (const interval_base_map& src) 
-    { 
-        this->_map = src._map;
-        return *this; 
-    }
-
 #   ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES
     //==========================================================================
     //= Move semantics
@@ -237,13 +230,22 @@
     }
 
     /** Move assignment operator */
-    interval_base_map& operator = (interval_base_map&& src) 
-    { 
+    interval_base_map& operator = (interval_base_map src) 
+    {                           //call by value sice 'src' is a "sink value" 
         this->_map = boost::move(src._map);
         return *this; 
     }
 
     //==========================================================================
+#   else 
+
+    /** Copy assignment operator */
+    interval_base_map& operator = (const interval_base_map& src) 
+    { 
+        this->_map = src._map;
+        return *this; 
+    }
+
 #   endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES
 
     /** swap the content of containers */
@@ -845,7 +847,7 @@
     {
         // [lead_gap--- . . .
         //          [-- it_ ...
-        iterator prior_ = prior(it_); 
+        iterator prior_ = it_==this->_map.begin()? it_ : prior(it_); 
         iterator inserted_ = this->template gap_insert<Combiner>(prior_, lead_gap, co_val);
         that()->handle_inserted(prior_, inserted_);
     }
@@ -957,7 +959,7 @@
     {
         // Detect the first and the end iterator of the collision sequence
         iterator first_ = this->_map.lower_bound(inter_val),
-                 last_  = insertion.first;
+                 last_  = prior(this->_map.upper_bound(inter_val));
         //assert(end_ == this->_map.upper_bound(inter_val));
         iterator it_ = first_;
         interval_type rest_interval = inter_val;
@@ -1096,9 +1098,7 @@
                   iterator& it_, const iterator& last_)
 {
     iterator end_   = boost::next(last_);
-    iterator prior_ = it_, inserted_;
-    if(prior_ != this->_map.end())
-        --prior_;
+    iterator prior_ = cyclic_prior(*this,it_), inserted_;
     interval_type rest_interval = inter_val, left_gap, cur_itv;
     interval_type last_interval = last_ ->first;
 
@@ -1152,7 +1152,7 @@
     {
         // Detect the first and the end iterator of the collision sequence
         iterator first_ = this->_map.lower_bound(inter_val),
-                 last_  = insertion.first;
+                 last_  = prior(this->_map.upper_bound(inter_val));
         //assert((++last_) == this->_map.upper_bound(inter_val));
         iterator it_ = first_;
         insert_main(inter_val, co_val, it_, last_);