Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71328 - in trunk: boost/icl boost/icl/concept boost/icl/type_traits libs/icl/test libs/icl/test/fix_tickets_ libs/icl/test/test_casual_
From: afojgo_at_[hidden]
Date: 2011-04-16 16:27:18


Author: jofaber
Date: 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
New Revision: 71328
URL: http://svn.boost.org/trac/boost/changeset/71328

Log:
Bugfix: ticket_5482
Added:
   trunk/boost/icl/type_traits/is_increasing.hpp (contents, props changed)
   trunk/libs/icl/test/fix_tickets_/
   trunk/libs/icl/test/fix_tickets_/fix_tickets.cpp (contents, props changed)
   trunk/libs/icl/test/fix_tickets_/vc9_fix_tickets.vcproj (contents, props changed)
Text files modified:
   trunk/boost/icl/concept/interval.hpp | 96 +++++++++++++++++++++++++---------------
   trunk/boost/icl/discrete_interval.hpp | 4
   trunk/boost/icl/left_open_interval.hpp | 3
   trunk/boost/icl/right_open_interval.hpp | 3
   trunk/boost/icl/type_traits/succ_pred.hpp | 70 +++++++++++++++++++++++++++--
   trunk/libs/icl/test/Jamfile.v2 | 1
   trunk/libs/icl/test/test_casual_/test_casual.cpp | 79 ++++++++++++++++++++++++--------
   trunk/libs/icl/test/vc9_icl_fast_tests.sln | 6 ++
   8 files changed, 196 insertions(+), 66 deletions(-)

Modified: trunk/boost/icl/concept/interval.hpp
==============================================================================
--- trunk/boost/icl/concept/interval.hpp (original)
+++ trunk/boost/icl/concept/interval.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -61,6 +61,26 @@
     return !(domain_compare()(left, right)) && !(domain_compare()(right, left));
 }
 
+template<class Type>
+inline typename enable_if< is_interval<Type>
+ , typename interval_traits<Type>::domain_type>::type
+domain_next(const typename interval_traits<Type>::domain_type value)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+ return icl::successor<domain_type,domain_compare>::apply(value);
+}
+
+template<class Type>
+inline typename enable_if< is_interval<Type>
+ , typename interval_traits<Type>::domain_type>::type
+domain_prior(const typename interval_traits<Type>::domain_type value)
+{
+ typedef typename interval_traits<Type>::domain_type domain_type;
+ typedef typename interval_traits<Type>::domain_compare domain_compare;
+ return icl::predecessor<domain_type,domain_compare>::apply(value);
+}
+
 //==============================================================================
 //= Construct<Interval> singleton
 //==============================================================================
@@ -74,7 +94,7 @@
 singleton(const typename interval_traits<Type>::domain_type& value)
 {
     //ASSERT: This always creates an interval with exactly one element
- return interval_traits<Type>::construct(value, icl::succ(value));
+ return interval_traits<Type>::construct(value, domain_next<Type>(value));
 }
 
 template<class Type>
@@ -90,7 +110,7 @@
     typedef typename interval_traits<Type>::domain_type domain_type;
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value) ));
 
- return interval_traits<Type>::construct(icl::pred(value), value);
+ return interval_traits<Type>::construct(domain_prior<Type>(value), value);
 }
 
 template<class Type>
@@ -101,7 +121,8 @@
     typedef typename interval_traits<Type>::domain_type domain_type;
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value)));
 
- return interval_traits<Type>::construct(icl::pred(value), icl::succ(value));
+ return interval_traits<Type>::construct( domain_prior<Type>(value)
+ , domain_next<Type>(value));
 }
 
 template<class Type>
@@ -139,7 +160,7 @@
>::type
 unit_trail(const typename interval_traits<Type>::domain_type& value)
 {
- return interval_traits<Type>::construct(value, icl::succ(value));
+ return interval_traits<Type>::construct(value, domain_next<Type>(value));
 }
 
 template<class Type>
@@ -154,7 +175,7 @@
     typedef typename interval_traits<Type>::domain_type domain_type;
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value) ));
 
- return interval_traits<Type>::construct(icl::pred(value), value);
+ return interval_traits<Type>::construct(domain_prior<Type>(value), value);
 }
 
 template<class Type>
@@ -169,7 +190,8 @@
     typedef typename interval_traits<Type>::domain_type domain_type;
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(value)));
 
- return interval_traits<Type>::construct(icl::pred(value), icl::succ(value));
+ return interval_traits<Type>::construct( domain_prior<Type>(value)
+ , domain_next<Type>(value));
 }
 
 template<class Type>
@@ -233,7 +255,7 @@
 span(const typename interval_traits<Type>::domain_type& left,
      const typename interval_traits<Type>::domain_type& right)
 {
- if(interval_traits<Type>::domain_compare(left,right))
+ if(interval_traits<Type>::domain_compare()(left,right))
         return construct<Type>(left, right);
     else
         return construct<Type>(right, left);
@@ -246,10 +268,10 @@
 hull(const typename interval_traits<Type>::domain_type& left,
      const typename interval_traits<Type>::domain_type& right)
 {
- if(interval_traits<Type>::domain_compare(left,right))
- return construct<Type>(left, icl::succ(right));
+ if(interval_traits<Type>::domain_compare()(left,right))
+ return construct<Type>(left, domain_next<Type>(right));
     else
- return construct<Type>(right, icl::succ(left));
+ return construct<Type>(right, domain_next<Type>(left));
 }
 
 template<class Type>
@@ -258,15 +280,15 @@
      const typename interval_traits<Type>::domain_type& right)
 {
     typedef typename interval_traits<Type>::domain_type domain_type;
- if(interval_traits<Type>::domain_compare(left,right))
+ if(interval_traits<Type>::domain_compare()(left,right))
     {
         BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(left) ));
- return construct<Type>(icl::pred(left), right);
+ return construct<Type>(domain_prior<Type>(left), right);
     }
     else
     {
         BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(right) ));
- return construct<Type>(icl::pred(right), left);
+ return construct<Type>(domain_prior<Type>(right), left);
     }
 }
 
@@ -275,7 +297,7 @@
 hull(const typename interval_traits<Type>::domain_type& left,
      const typename interval_traits<Type>::domain_type& right)
 {
- if(interval_traits<Type>::domain_compare(left,right))
+ if(interval_traits<Type>::domain_compare()(left,right))
         return construct<Type>(left, right);
     else
         return construct<Type>(right, left);
@@ -287,15 +309,17 @@
      const typename interval_traits<Type>::domain_type& right)
 {
     typedef typename interval_traits<Type>::domain_type domain_type;
- if(interval_traits<Type>::domain_compare(left,right))
+ if(interval_traits<Type>::domain_compare()(left,right))
     {
         BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(left) ));
- return construct<Type>(icl::pred(left), icl::succ(right));
+ return construct<Type>( domain_prior<Type>(left)
+ , domain_next<Type>(right));
     }
     else
     {
         BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value >::is_less_than(right) ));
- return construct<Type>(icl::pred(right), icl::succ(left));
+ return construct<Type>( domain_prior<Type>(right)
+ , domain_next<Type>(left));
     }
 }
 
@@ -304,7 +328,7 @@
 hull(const typename interval_traits<Type>::domain_type& left,
      const typename interval_traits<Type>::domain_type& right)
 {
- if(interval_traits<Type>::domain_compare(left,right))
+ if(interval_traits<Type>::domain_compare()(left,right))
         return construct<Type>(left, right, interval_bounds::closed());
     else
         return construct<Type>(right, left, interval_bounds::closed());
@@ -348,7 +372,7 @@
          , typename interval_traits<Type>::domain_type>::type
 first(const Type& object)
 {
- return icl::succ(lower(object));
+ return domain_next<Type>(lower(object));
 }
 
 template<class Type>
@@ -357,8 +381,8 @@
 first(const Type& object)
 {
     return is_left_closed(object.bounds()) ?
- lower(object) :
- icl::succ(lower(object));
+ lower(object) :
+ domain_next<Type>(lower(object));
 }
 
 //- last -----------------------------------------------------------------------
@@ -381,7 +405,7 @@
     typedef typename interval_traits<Type>::domain_type domain_type;
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value>
                                  ::is_less_than(upper(object)) ));
- return icl::pred(upper(object));
+ return domain_prior<Type>(upper(object));
 }
 
 template<class Type>
@@ -393,8 +417,8 @@
     BOOST_ASSERT((numeric_minimum<domain_type, is_numeric<domain_type>::value>
                                  ::is_less_than_or(upper(object), is_right_closed(object.bounds())) ));
     return is_right_closed(object.bounds()) ?
- upper(object) :
- icl::pred(upper(object));
+ upper(object) :
+ domain_prior<Type>(upper(object));
 }
 
 //- last_next ------------------------------------------------------------------
@@ -405,7 +429,7 @@
          , typename interval_traits<Type>::domain_type>::type
 last_next(const Type& object)
 {
- return icl::succ(upper(object));
+ return domain_next<Type>(upper(object));
 }
 
 template<class Type>
@@ -425,8 +449,8 @@
 last_next(const Type& object)
 {
     return is_right_closed(object.bounds()) ?
- icl::succ(upper(object)):
- upper(object) ;
+ domain_next<Type>(upper(object)):
+ upper(object) ;
 }
 
 //------------------------------------------------------------------------------
@@ -507,7 +531,7 @@
 typename boost::enable_if<is_static_open<Type>, bool>::type
 is_empty(const Type& object)
 {
- return domain_less_equal<Type>(upper(object), icl::succ(lower(object)));
+ return domain_less_equal<Type>(upper(object), domain_next<Type>(lower(object)));
 }
 
 template<class Type>
@@ -517,7 +541,7 @@
     if(object.bounds() == interval_bounds::closed())
         return domain_less<Type>(upper(object), lower(object));
     else if(object.bounds() == interval_bounds::open())
- return domain_less_equal<Type>(upper(object), icl::succ(lower(object)));
+ return domain_less_equal<Type>(upper(object), domain_next<Type>(lower(object)));
     else
         return domain_less_equal<Type>(upper(object), lower(object));
 }
@@ -894,7 +918,7 @@
 typename boost::enable_if<is_discrete_interval<Type>, bool>::type
 touches(const Type& left, const Type& right)
 {
- return domain_equal<Type>(icl::succ(last(left)), first(right));
+ return domain_equal<Type>(domain_next<Type>(last(left)), first(right));
 }
 
 template<class Type>
@@ -1100,7 +1124,7 @@
     if(exclusive_less(left_minuend, right))
         return right;
 
- return construct<Type>(icl::succ(upper(left_minuend)), upper(right));
+ return construct<Type>(domain_next<Type>(upper(left_minuend)), upper(right));
 }
 
 template<class Type>
@@ -1110,7 +1134,7 @@
     if(exclusive_less(left_minuend, right))
         return right;
 
- return construct<Type>(icl::pred(upper(left_minuend)), upper(right));
+ return construct<Type>(domain_prior<Type>(upper(left_minuend)), upper(right));
 }
 
 template<class Type>
@@ -1152,7 +1176,7 @@
     else if(lower_less_equal(right_minuend, left))
         return identity_element<Type>::value();
 
- return construct<Type>(lower(left), icl::pred(lower(right_minuend)));
+ return construct<Type>(lower(left), domain_prior<Type>(lower(right_minuend)));
 }
 
 template<class Type>
@@ -1162,7 +1186,7 @@
     if(exclusive_less(left, right_minuend))
         return left;
 
- return construct<Type>(lower(left), icl::succ(lower(right_minuend)));
+ return construct<Type>(lower(left), domain_next<Type>(lower(right_minuend)));
 }
 
 template<class Type>
@@ -1273,9 +1297,9 @@
     if(icl::is_empty(left) || icl::is_empty(right))
         return identity_element<Type>::value();
     else if(exclusive_less(left, right))
- return construct<Type>(icl::succ(upper(left)), icl::pred(lower(right)));
+ return construct<Type>(domain_next<Type>(upper(left)), domain_prior<Type>(lower(right)));
     else if(exclusive_less(right, left))
- return construct<Type>(icl::succ(upper(right)), icl::pred(lower(left)));
+ return construct<Type>(domain_next<Type>(upper(right)), domain_prior<Type>(lower(left)));
     else
         return identity_element<Type>::value();
 }

Modified: trunk/boost/icl/discrete_interval.hpp
==============================================================================
--- trunk/boost/icl/discrete_interval.hpp (original)
+++ trunk/boost/icl/discrete_interval.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -72,10 +72,10 @@
     domain_type upper()const { return _upb; }
     interval_bounds bounds()const{ return _bounds; }
 
- static discrete_interval open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::open()); }
+ static discrete_interval open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::open()); }
     static discrete_interval right_open(const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::right_open());}
     static discrete_interval left_open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::left_open()); }
- static discrete_interval closed (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::closed()); }
+ static discrete_interval closed (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::closed()); }
 
 private:
     domain_type _lwb;

Modified: trunk/boost/icl/left_open_interval.hpp
==============================================================================
--- trunk/boost/icl/left_open_interval.hpp (original)
+++ trunk/boost/icl/left_open_interval.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -24,6 +24,7 @@
 public:
     typedef left_open_interval<DomainT,Compare> type;
     typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
 
 public:
     //==========================================================================
@@ -41,7 +42,7 @@
 
     /** Constructor for a left-open singleton interval <tt>(val-1,val]</tt> */
     explicit left_open_interval(const DomainT& val)
- : _lwb(icl::pred(val)), _upb(val)
+ : _lwb(predecessor<DomainT,domain_compare>::apply(val)), _upb(val)
     {
         BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
         BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));

Modified: trunk/boost/icl/right_open_interval.hpp
==============================================================================
--- trunk/boost/icl/right_open_interval.hpp (original)
+++ trunk/boost/icl/right_open_interval.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -25,6 +25,7 @@
 public:
     typedef right_open_interval<DomainT,Compare> type;
     typedef DomainT domain_type;
+ typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
 
 public:
     //==========================================================================
@@ -42,7 +43,7 @@
 
     /** Constructor for a singleton interval <tt>[val,val+1)</tt> */
     explicit right_open_interval(const DomainT& val)
- : _lwb(val), _upb(icl::succ(val))
+ : _lwb(val), _upb(icl::successor<DomainT,domain_compare>::apply(val))
     {
         BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
         BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));

Added: trunk/boost/icl/type_traits/is_increasing.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/icl/type_traits/is_increasing.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,34 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_IS_INCREASING_HPP_JOFA_110416
+#define BOOST_ICL_TYPE_TRAITS_IS_INCREASING_HPP_JOFA_110416
+
+#include <functional>
+
+namespace boost{ namespace icl
+{
+
+template <class DomainT, class Compare>
+struct is_increasing
+{
+ typedef is_increasing type;
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <class DomainT>
+struct is_increasing<DomainT, std::greater<DomainT> >
+{
+ typedef is_increasing type;
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+}} // namespace boost icl
+
+#endif
+
+

Modified: trunk/boost/icl/type_traits/succ_pred.hpp
==============================================================================
--- trunk/boost/icl/type_traits/succ_pred.hpp (original)
+++ trunk/boost/icl/type_traits/succ_pred.hpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -1,5 +1,5 @@
 /*-----------------------------------------------------------------------------+
-Copyright (c) 2008-2009: Joachim Faulhaber
+Copyright (c) 2008-2011: Joachim Faulhaber
 +------------------------------------------------------------------------------+
    Distributed under the Boost Software License, Version 1.0.
       (See accompanying file LICENCE.txt or copy at
@@ -8,13 +8,73 @@
 #ifndef BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913
 #define BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913
 
+#include <boost/icl/type_traits/is_increasing.hpp>
+
 namespace boost{ namespace icl
 {
- template <class IncrementableT>
- inline static IncrementableT succ(IncrementableT x) { return ++x; }
+template <class IncrementableT>
+inline static IncrementableT succ(IncrementableT x) { return ++x; }
+
+template <class DecrementableT>
+inline static DecrementableT pred(DecrementableT x) { return --x; }
+
+namespace detail
+{
+ template <class DomainT, bool increasing = true>
+ struct successor;
 
- template <class DecrementableT>
- inline static DecrementableT pred(DecrementableT x) { return --x; }
+ template <class DomainT>
+ struct successor<DomainT, true>
+ {
+ typedef successor type;
+ inline static DomainT apply(DomainT value){ return ++value; }
+ };
+
+ template <class DomainT>
+ struct successor<DomainT, false>
+ {
+ typedef successor type;
+ inline static DomainT apply(DomainT value){ return --value; }
+ };
+
+ template <class DomainT, bool increasing = true>
+ struct predecessor;
+
+ template <class DomainT>
+ struct predecessor<DomainT, true>
+ {
+ typedef predecessor type;
+ inline static DomainT apply(DomainT value){ return --value; }
+ };
+
+ template <class DomainT>
+ struct predecessor<DomainT, false>
+ {
+ typedef predecessor type;
+ inline static DomainT apply(DomainT value){ return ++value; }
+ };
+} // namespace detail
+
+//------------------------------------------------------------------------------
+template <class DomainT, class Compare>
+struct successor
+{
+ inline static DomainT apply(DomainT value)
+ {
+ return detail::successor
+ <DomainT, is_increasing<DomainT,Compare>::value>::apply(value);
+ }
+};
+
+template <class DomainT, class Compare>
+struct predecessor
+{
+ inline static DomainT apply(DomainT value)
+ {
+ return detail::predecessor
+ <DomainT, is_increasing<DomainT,Compare>::value>::apply(value);
+ }
+};
 
 }} // namespace boost icl
 

Modified: trunk/libs/icl/test/Jamfile.v2
==============================================================================
--- trunk/libs/icl/test/Jamfile.v2 (original)
+++ trunk/libs/icl/test/Jamfile.v2 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -70,6 +70,7 @@
       
       # Bug fixes --------------------------------------------------------------
       [ run fix_icl_after_thread_/fix_icl_after_thread.cpp ]
+ [ run fix_tickets_/fix_tickets.cpp ]
       
       # Check for compiler bugs ------------------------------------------------
       # compile-fail-tests

Added: trunk/libs/icl/test/fix_tickets_/fix_tickets.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_tickets_/fix_tickets.cpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,42 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::fix_icl_after_thread unit test
+#include <libs/icl/test/disable_test_warnings.hpp>
+#include "../unit_test_unwarned.hpp"
+
+//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE(ticket_5482)
+{
+ typedef interval_map<int,int,partial_absorber,std::less> m1_t;
+ typedef interval_map<int,int,partial_absorber,std::greater> m2_t;
+ m1_t m1;
+ m2_t m2;
+ m1.insert(make_pair(m1_t::interval_type(1), 20));
+ m1.insert(make_pair(m1_t::interval_type(2), 20));
+ m1.insert(make_pair(m1_t::interval_type(3), 20));
+
+ m2.insert(make_pair(m2_t::interval_type(1), 20));
+ m2.insert(make_pair(m2_t::interval_type(2), 20));
+ m2.insert(make_pair(m2_t::interval_type(3), 20));
+
+ BOOST_CHECK_EQUAL(m1.iterative_size(), m2.iterative_size());
+ BOOST_CHECK_EQUAL(m1.iterative_size(), 1);
+ BOOST_CHECK_EQUAL(m2.iterative_size(), 1);
+}
+

Added: trunk/libs/icl/test/fix_tickets_/vc9_fix_tickets.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_tickets_/vc9_fix_tickets.vcproj 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fix_tickets"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}"
+ RootNamespace="fix_tickets"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fix_tickets.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: trunk/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- trunk/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ trunk/libs/icl/test/test_casual_/test_casual.cpp 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -183,32 +183,69 @@
 
 }
 
-BOOST_AUTO_TEST_CASE(casual)
+BOOST_AUTO_TEST_CASE(invariance_wrt_compare_ordering_ticket_5482)
 {
- //typedef int T;
- //typedef int U;
- //typedef interval_map<T,U, total_absorber> IntervalMapT;
- //typedef interval_set<T> IntervalSetT;
- //typedef IntervalMapT::interval_type IntervalT;
-
- BOOST_CHECK((has_std_infinity<double>::value));
-
- BOOST_CHECK((boost::detail::is_incrementable<chrono::duration<int> >::value));
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, partial_absorber> IntervalMapT;
+ typedef interval_map<T,U, partial_absorber,std::less> IntervalLtMapT;
+ typedef interval_map<T,U, partial_absorber,std::greater> IntervalGtMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
+ typedef IntervalLtMapT::interval_type IntervalLtT;
+ typedef IntervalGtMapT::interval_type IntervalGtT;
+
+ IntervalLtMapT lt_map;
+ IntervalGtMapT gt_map;
+
+ BOOST_CHECK( IntervalLtMapT::domain_compare()(0,1));
+ BOOST_CHECK(!IntervalLtMapT::domain_compare()(1,0));
+ BOOST_CHECK( IntervalGtMapT::domain_compare()(1,0));
+ BOOST_CHECK(!IntervalGtMapT::domain_compare()(0,1));
+
+ IntervalGtT(5);
+
+ lt_map.insert(make_pair(IntervalLtT(1),1));
+ lt_map.insert(make_pair(IntervalLtT(2),1));
+
+ gt_map.insert(make_pair(IntervalGtT(2,1),1));
+ gt_map.insert(make_pair(IntervalGtT(3,2),1));
+ gt_map.insert(make_pair(IntervalGtT(5,4),1));
+ gt_map.add(make_pair(IntervalGtT(8,2),1));
+
+ cout << "-----------------------------\n";
+ cout << "lt_map.iterative_size() = " << lt_map.iterative_size() << endl;
+ cout << "gt_map.iterative_size() = " << gt_map.iterative_size() << endl;
+ cout << "gt_map : " << gt_map << endl;
+
 
- BOOST_CHECK((has_rep_type<chrono::duration<int> >::value));
- BOOST_CHECK((represents<int, chrono::duration<int> >::value));
-
- BOOST_CHECK((!is_discrete<chrono::duration<double> >::value));
+ BOOST_CHECK_EQUAL(true, true);
+}
 
- //BOOST_CHECK((!is_discrete<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<boost::rational<int> >::value));
- BOOST_CHECK(( !is_discrete<boost::rational<int> >::value));
 
- BOOST_CHECK(( has_rep_type<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<Now_time_rational>::value));
- BOOST_CHECK(( !is_discrete<Now_time_rational>::value));
- BOOST_CHECK(( is_continuous<typename rep_type_of<Now_time_rational>::type>::value));
+BOOST_AUTO_TEST_CASE(ticket_5482)
+{
+ typedef interval_map<int,int,partial_absorber,std::less> m1_t;
+ typedef interval_map<int,int,partial_absorber,std::greater> m2_t;
+ m1_t m1;
+ m2_t m2;
+ m1.insert(make_pair(m1_t::interval_type(1), 20));
+ m1.insert(make_pair(m1_t::interval_type(2), 20));
+ m1.insert(make_pair(m1_t::interval_type(3), 20));
+
+ m2.insert(make_pair(m2_t::interval_type(1), 20));
+ m2.insert(make_pair(m2_t::interval_type(2), 20));
+ m2.insert(make_pair(m2_t::interval_type(3), 20));
+ BOOST_CHECK_EQUAL(m1.iterative_size(), m2.iterative_size());
+}
 
+BOOST_AUTO_TEST_CASE(casual)
+{
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, partial_absorber> IntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
 
     BOOST_CHECK_EQUAL(true, true);
 }

Modified: trunk/libs/icl/test/vc9_icl_fast_tests.sln
==============================================================================
--- trunk/libs/icl/test/vc9_icl_fast_tests.sln (original)
+++ trunk/libs/icl/test/vc9_icl_fast_tests.sln 2011-04-16 16:27:16 EDT (Sat, 16 Apr 2011)
@@ -67,6 +67,8 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fast_stat_interval_map", "fast_stat_interval_map_\vc9_fast_stat_interval_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fix_tickets", "fix_tickets_\vc9_fix_tickets.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -205,6 +207,10 @@
                 {EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Release|Win32.ActiveCfg = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA1}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE


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