diff -bur ./boost_1_55_0/boost/icl/closed_interval.hpp ./modular-boost/boost/icl/closed_interval.hpp --- ./boost_1_55_0/boost/icl/closed_interval.hpp 2011-06-05 15:36:25.000000000 +0200 +++ ./modular-boost/boost/icl/closed_interval.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -8,6 +8,7 @@ #ifndef BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 #define BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 +#include #include #include #include diff -bur ./boost_1_55_0/boost/icl/impl_config.hpp ./modular-boost/boost/icl/impl_config.hpp --- ./boost_1_55_0/boost/icl/impl_config.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/impl_config.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -48,10 +48,10 @@ +-----------------------------------------------------------------------------*/ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # define BOOST_ICL_NO_CXX11_RVALUE_REFERENCES -#elif defined(__clang__) -# define BOOST_ICL_NO_CXX11_RVALUE_REFERENCES -#elif (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) -# define BOOST_ICL_NO_CXX11_RVALUE_REFERENCES +//#elif defined(__clang__) +//# define BOOST_ICL_NO_CXX11_RVALUE_REFERENCES +//#elif (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) +//# define BOOST_ICL_NO_CXX11_RVALUE_REFERENCES #endif #include diff -bur ./boost_1_55_0/boost/icl/interval_base_map.hpp ./modular-boost/boost/icl/interval_base_map.hpp --- ./boost_1_55_0/boost/icl/interval_base_map.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/interval_base_map.hpp 2014-02-01 22:18:02.000000000 +0100 @@ -215,13 +215,6 @@ BOOST_CONCEPT_ASSERT((EqualComparableConcept)); } - /** 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(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_); diff -bur ./boost_1_55_0/boost/icl/interval_base_set.hpp ./modular-boost/boost/icl/interval_base_set.hpp --- ./boost_1_55_0/boost/icl/interval_base_set.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/interval_base_set.hpp 2013-12-20 18:01:47.000000000 +0100 @@ -168,13 +168,6 @@ BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); } - /** Assignment operator */ - interval_base_set& operator = (const interval_base_set& src) - { - this->_set = src._set; - return *this; - } - # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics @@ -188,13 +181,22 @@ } /** Move assignment operator */ - interval_base_set& operator = (interval_base_set&& src) - { + interval_base_set& operator = (interval_base_set src) + { //call by value sice 'src' is a "sink value" this->_set = boost::move(src._set); return *this; } //========================================================================== +# else + + /** Copy assignment operator */ + interval_base_set& operator = (const interval_base_set& src) + { + this->_set = src._set; + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES /** swap the content of containers */ @@ -497,6 +499,7 @@ interval_base_set ::_add(const segment_type& addend) { + typedef typename interval_base_set::iterator iterator; if(icl::is_empty(addend)) return this->_set.end(); @@ -505,7 +508,10 @@ if(insertion.second) return that()->handle_inserted(insertion.first); else - return that()->add_over(addend, insertion.first); + { + iterator last_ = prior(this->_set.upper_bound(addend)); + return that()->add_over(addend, last_); + } } template @@ -513,6 +519,7 @@ interval_base_set ::_add(iterator prior_, const segment_type& addend) { + typedef typename interval_base_set::iterator iterator; if(icl::is_empty(addend)) return prior_; @@ -521,7 +528,10 @@ if(*insertion == addend) return that()->handle_inserted(insertion); else - return that()->add_over(addend); + { + iterator last_ = prior(this->_set.upper_bound(addend)); + return that()->add_over(addend, last_); + } } //============================================================================== diff -bur ./boost_1_55_0/boost/icl/interval_map.hpp ./modular-boost/boost/icl/interval_map.hpp --- ./boost_1_55_0/boost/icl/interval_map.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/interval_map.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -93,20 +93,6 @@ { this->add(value_pair); } - /// Assignment operator - interval_map& operator = (const interval_map& src) - { - base_type::operator=(src); - return *this; - } - - /// Assignment operator for base type - template - interval_map& operator = - (const interval_base_map& src) - { this->assign(src); return *this; } - /// Assignment from a base interval_map. template void assign(const interval_base_mapadd(prior_, *it_); } + /// Assignment operator for base type + template + interval_map& operator = + (const interval_base_map& src) + { + this->assign(src); + return *this; + } + # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics @@ -131,13 +127,22 @@ {} /// Move assignment operator - interval_map& operator = (interval_map&& src) + interval_map& operator = (interval_map src) { base_type::operator=(boost::move(src)); return *this; } //========================================================================== +# else + + /// Assignment operator + interval_map& operator = (const interval_map& src) + { + base_type::operator=(src); + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: diff -bur ./boost_1_55_0/boost/icl/interval_set.hpp ./modular-boost/boost/icl/interval_set.hpp --- ./boost_1_55_0/boost/icl/interval_set.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/interval_set.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -115,23 +115,6 @@ this->add(itv); } - /// Assignment operator - interval_set& operator = (const interval_set& src) - { - base_type::operator=(src); - return *this; - } - - /// Assignment operator for base type - template - interval_set& operator = - (const interval_base_set& src) - { - this->assign(src); - return *this; - } - - /// Assignment from a base interval_set. template void assign(const interval_base_set& src) @@ -144,6 +127,15 @@ prior_ = this->add(prior_, *it_); } + /// Assignment operator for base type + template + interval_set& operator = + (const interval_base_set& src) + { + this->assign(src); + return *this; + } + # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics @@ -155,12 +147,21 @@ {} /// Move assignment operator - interval_set& operator = (interval_set&& src) + interval_set& operator = (interval_set src) { base_type::operator=(boost::move(src)); return *this; } + //========================================================================== +# else + /// Assignment operator + interval_set& operator = (const interval_set& src) + { + base_type::operator=(src); + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: diff -bur ./boost_1_55_0/boost/icl/map.hpp ./modular-boost/boost/icl/map.hpp --- ./boost_1_55_0/boost/icl/map.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/map.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -192,12 +192,6 @@ insert(key_value_pair); } - map& operator = (const map& src) - { - base_type::operator=(src); - return *this; - } - # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics @@ -212,12 +206,20 @@ BOOST_CONCEPT_ASSERT((EqualComparableConcept)); } - map& operator = (map&& src) + map& operator = (map src) { - base_type::operator=(src); + base_type::operator=(boost::move(src)); return *this; } //========================================================================== +# else + + map& operator = (const map& src) + { + base_type::operator=(src); + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES void swap(map& src) { base_type::swap(src); } diff -bur ./boost_1_55_0/boost/icl/open_interval.hpp ./modular-boost/boost/icl/open_interval.hpp --- ./boost_1_55_0/boost/icl/open_interval.hpp 2011-06-05 15:36:25.000000000 +0200 +++ ./modular-boost/boost/icl/open_interval.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff -bur ./boost_1_55_0/boost/icl/separate_interval_set.hpp ./modular-boost/boost/icl/separate_interval_set.hpp --- ./boost_1_55_0/boost/icl/separate_interval_set.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/separate_interval_set.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -106,11 +106,12 @@ /// Constructor for a single interval explicit separate_interval_set(const interval_type& itv): base_type() { this->add(itv); } - /// Assignment operator - separate_interval_set& operator = (const separate_interval_set& src) + /// Assignment from a base interval_set. + template + void assign(const interval_base_set& src) { - base_type::operator=(src); - return *this; + this->clear(); + this->_set.insert(src.begin(), src.end()); } /// Assignment operator for base type @@ -122,14 +123,6 @@ return *this; } - /// Assignment from a base interval_set. - template - void assign(const interval_base_set& src) - { - this->clear(); - this->_set.insert(src.begin(), src.end()); - } - # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics @@ -141,12 +134,21 @@ {} /// Move assignment operator - separate_interval_set& operator = (separate_interval_set&& src) + separate_interval_set& operator = (separate_interval_set src) { base_type::operator=(boost::move(src)); return *this; } //========================================================================== +# else + + /// Assignment operator + separate_interval_set& operator = (const separate_interval_set& src) + { + base_type::operator=(src); + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: diff -bur ./boost_1_55_0/boost/icl/split_interval_map.hpp ./modular-boost/boost/icl/split_interval_map.hpp --- ./boost_1_55_0/boost/icl/split_interval_map.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/split_interval_map.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -78,11 +78,13 @@ explicit split_interval_map(const value_type& value_pair): base_type() { this->add(value_pair); } - /// Assignment operator - split_interval_map& operator = (const split_interval_map& src) + /// Assignment from a base interval_map. + template + void assign(const interval_base_map& src) { - base_type::operator=(src); - return *this; + this->clear(); + this->_map.insert(src.begin(), src.end()); } /// Assignment operator for base type @@ -90,15 +92,9 @@ split_interval_map& operator = (const interval_base_map& src) - { this->assign(src); return *this; } - - /// Assignment from a base interval_map. - template - void assign(const interval_base_map& src) { - this->clear(); - this->_map.insert(src.begin(), src.end()); + this->assign(src); + return *this; } # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES @@ -112,13 +108,22 @@ {} /// Move assignment operator - split_interval_map& operator = (split_interval_map&& src) + split_interval_map& operator = (split_interval_map src) { base_type::operator=(boost::move(src)); return *this; } //========================================================================== +# else + + /// Assignment operator + split_interval_map& operator = (const split_interval_map& src) + { + base_type::operator=(src); + return *this; + } + # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: diff -bur ./boost_1_55_0/boost/icl/split_interval_set.hpp ./modular-boost/boost/icl/split_interval_set.hpp --- ./boost_1_55_0/boost/icl/split_interval_set.hpp 2012-12-31 02:17:30.000000000 +0100 +++ ./modular-boost/boost/icl/split_interval_set.hpp 2014-02-01 22:18:02.000000000 +0100 @@ -104,25 +104,21 @@ /// Constructor for a single interval explicit split_interval_set(const domain_type& itv): base_type() { this->add(itv); } - /// Assignment operator - split_interval_set& operator = (const split_interval_set& src) + /// Assignment from a base interval_set. + template + void assign(const interval_base_set& src) { - base_type::operator=(src); - return *this; + this->clear(); + this->_set.insert(src.begin(), src.end()); } /// Assignment operator for base type template split_interval_set& operator = (const interval_base_set& src) - { this->assign(src); return *this; } - - /// Assignment from a base interval_set. - template - void assign(const interval_base_set& src) { - this->clear(); - this->_set.insert(src.begin(), src.end()); + this->assign(src); + return *this; } # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES @@ -136,14 +132,22 @@ {} /// Move assignment operator - split_interval_set& operator = (split_interval_set&& src) + split_interval_set& operator = (split_interval_set src) { base_type::operator=(boost::move(src)); return *this; } //========================================================================== -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES +# else + + /// Assignment operator + split_interval_set& operator = (const split_interval_set& src) + { + base_type::operator=(src); + return *this; + } +# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: // Private functions that shall be accessible by the baseclass: diff -bur ./boost_1_55_0/boost/icl/type_traits/identity_element.hpp ./modular-boost/boost/icl/type_traits/identity_element.hpp --- ./boost_1_55_0/boost/icl/type_traits/identity_element.hpp 2010-12-15 21:32:02.000000000 +0100 +++ ./modular-boost/boost/icl/type_traits/identity_element.hpp 2013-12-20 18:01:07.000000000 +0100 @@ -21,7 +21,8 @@ template inline Type identity_element::value() { - return Type(); + static Type _value; + return _value; } template<>