Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69544 - in sandbox/icl/libs/icl: doc example test test/cmp_clang_ttp_passing2_ test/cmp_clang_ttp_passing_ test/cmp_msvc_value_born_error_ test/fast_stat_interval_map_ test/fastest_icl_interval_ test/fix_icl_after_thread_ test/fix_include_after_thread_ test/test_casual_
From: afojgo_at_[hidden]
Date: 2011-03-04 06:55:36


Author: jofaber
Date: 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
New Revision: 69544
URL: http://svn.boost.org/trac/boost/changeset/69544

Log:
Merged changes from trunk back to sandbox at 1.46.1/2
Added:
   sandbox/icl/libs/icl/test/cmp_clang_ttp_passing2_/
      - copied from r69525, /trunk/libs/icl/test/cmp_clang_ttp_passing2_/
   sandbox/icl/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp
      - copied unchanged from r69525, /trunk/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp
   sandbox/icl/libs/icl/test/cmp_clang_ttp_passing2_/vc9_cmp_clang_ttp_passing2.vcproj
      - copied unchanged from r69525, /trunk/libs/icl/test/cmp_clang_ttp_passing2_/vc9_cmp_clang_ttp_passing2.vcproj
   sandbox/icl/libs/icl/test/fast_stat_interval_map_/
      - copied from r69525, /trunk/libs/icl/test/fast_stat_interval_map_/
   sandbox/icl/libs/icl/test/fast_stat_interval_map_/fast_stat_interval_map.cpp
      - copied unchanged from r69525, /trunk/libs/icl/test/fast_stat_interval_map_/fast_stat_interval_map.cpp
   sandbox/icl/libs/icl/test/fast_stat_interval_map_/vc9_fast_stat_interval_map.vcproj
      - copied unchanged from r69525, /trunk/libs/icl/test/fast_stat_interval_map_/vc9_fast_stat_interval_map.vcproj
   sandbox/icl/libs/icl/test/fast_stat_interval_map_cases.hpp
      - copied unchanged from r69525, /trunk/libs/icl/test/fast_stat_interval_map_cases.hpp
Properties modified:
   sandbox/icl/libs/icl/doc/ (props changed)
   sandbox/icl/libs/icl/example/ (props changed)
   sandbox/icl/libs/icl/test/ (props changed)
Text files modified:
   sandbox/icl/libs/icl/test/Jamfile.v2 | 14 +
   sandbox/icl/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp | 58 +++++--
   sandbox/icl/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp | 6
   sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp | 22 +-
   sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp | 27 ++-
   sandbox/icl/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp | 12 -
   sandbox/icl/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp | 9 +
   sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp | 85 +++-------
   sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp | 2
   sandbox/icl/libs/icl/test/test_icl_interval.hpp | 18 ++
   sandbox/icl/libs/icl/test/test_interval_map_cases.hpp | 9 +
   sandbox/icl/libs/icl/test/test_interval_map_shared.hpp | 292 +++++++++++++++++++++++++++++++--------
   sandbox/icl/libs/icl/test/test_interval_set_shared.hpp | 26 +++
   sandbox/icl/libs/icl/test/test_type_lists.hpp | 38 ++++
   sandbox/icl/libs/icl/test/test_value_maker.hpp | 21 +
   sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln | 18 ++
   16 files changed, 475 insertions(+), 182 deletions(-)

Modified: sandbox/icl/libs/icl/test/Jamfile.v2
==============================================================================
--- sandbox/icl/libs/icl/test/Jamfile.v2 (original)
+++ sandbox/icl/libs/icl/test/Jamfile.v2 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -10,7 +10,6 @@
     : requirements
       <library>/boost/test//boost_unit_test_framework
       <library>/boost/date_time//boost_date_time
- <library>/boost/thread//boost_thread
       <link>static
       <include>../../..
     ;
@@ -34,6 +33,13 @@
       
       # maps
       [ run fastest_interval_map_/fastest_interval_map.cpp ]
+
+ [ run fast_stat_interval_map_/fast_stat_interval_map.cpp
+ : : : : interval_map_right_open ]
+ [ run fast_stat_interval_map_/fast_stat_interval_map.cpp
+ : : : <define>BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT=left_open_interval
+ : interval_map_left_open ]
+
       [ run fastest_interval_map_infix_/fastest_interval_map_infix.cpp ]
       [ run fastest_split_interval_map_/fastest_split_interval_map.cpp ]
       [ run fastest_split_interval_map_infix_/fastest_split_interval_map_infix.cpp ]
@@ -62,11 +68,15 @@
       [ run test_changing_interval_defaults_/test_changing_interval_defaults.cpp ]
       
       # Bug fixes --------------------------------------------------------------
- [ run fix_include_after_thread_/fix_include_after_thread.cpp ]
       [ run fix_icl_after_thread_/fix_icl_after_thread.cpp ]
       
       # Check for compiler bugs ------------------------------------------------
       # compile-fail-tests
       [ run cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp ]
       [ run cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp ]
+ [ run cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp ]
+
+ # Ad hoc -----------------------------------------------------------------
+ #[ run test_casual_/test_casual.cpp ]
+
     ;

Modified: sandbox/icl/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp (original)
+++ sandbox/icl/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -13,33 +13,53 @@
 
 namespace sep
 {
+ template<class T>class less{};
 
-template<class T>class less{};
-
-template
-<
- class T,
- template<class>class less_T = sep::less
->
-class cont{};
+ template
+ <
+ class T,
+ template<class>class Less = sep::less
+ >
+ class interv
+ {
+ public:
+ typedef interv<T,Less> type;
+ };
+
+ template
+ <
+ class T,
+ template<class>class Less = sep::less,
+ class I = typename sep::interv<T,Less>::type
+ >
+ class cont
+ {
+ public:
+ bool test()const { return true; }
+ };
+}//namespace sep
 
 template
 <
- class T,
- template<class T2,
- template<class>class less_T2 = sep::less>class Cont
+ template
+ <
+ class _T,
+ template<class>class _Less = sep::less,
+ class I = typename sep::interv<_T,_Less>::type
+ >
+ class Cont,
+ class T
>
-void func()
+bool test_ttp()
 {
- typedef Cont<T> cont_type;
-}
-
-}//namespace sep
-
+ typedef Cont<T> cont_type;
+ cont_type test_cont;
+ return test_cont.test();
+};
 
 BOOST_AUTO_TEST_CASE(dummy)
 {
- sep::func<int, sep::cont>();
- BOOST_CHECK( true );
+ bool result = test_ttp<sep::cont, int>();
+ BOOST_CHECK( result );
 }
 

Modified: sandbox/icl/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp (original)
+++ sandbox/icl/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -10,8 +10,8 @@
 #include "../unit_test_unwarned.hpp"
 
 namespace unhelpful{
- // This declaration of a class template will cause
- // the compilation of line 17 to fail with syntax error C2059
+ // This declaration of a class template will cause
+ // the compilation of line 17 to fail with syntax error C2059
     template<class T> class value{};
 }
 
@@ -34,6 +34,6 @@
 
 BOOST_AUTO_TEST_CASE(dummy)
 {
- BOOST_CHECK( meta_predicate<int>::value );
+ BOOST_CHECK( meta_predicate<int>::value );
 }
 

Modified: sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp (original)
+++ sandbox/icl/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -11,8 +11,6 @@
 #include <boost/mpl/list.hpp>
 #include "../unit_test_unwarned.hpp"
 
-//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
-
 // interval instance types
 #include "../test_type_lists.hpp"
 #include "../test_value_maker.hpp"
@@ -50,28 +48,36 @@
 //- sta.asy.{dis|con} ----------------------------------------------------------
 BOOST_AUTO_TEST_CASE
 (fastest_itl_right_open_interval_ctor_4_ordered_types)
-{ interval_ctor_4_ordered_types<right_open_interval<ordered_type_1> >(); }
+{ interval_ctor_4_ordered_types<right_open_interval<ordered_type_1> >(); }
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_right_open_interval_4_ordered_types)
-{ singelizable_interval_4_ordered_types<right_open_interval<discrete_type_1> >(); }
+{ singelizable_interval_4_ordered_types<right_open_interval<discrete_type_1> >(); }
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_right_open_interval_4_bicremental_types)
-{ singelizable_interval_4_bicremental_types<right_open_interval<discrete_type_2> >(); }
+{ singelizable_interval_4_bicremental_types<right_open_interval<discrete_type_2> >(); }
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_left_open_interval_ctor_4_ordered_types)
-{ interval_ctor_4_ordered_types<left_open_interval<ordered_type_2> >(); }
+{ interval_ctor_4_ordered_types<left_open_interval<ordered_type_2> >(); }
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_left_open_interval_4_ordered_types_singelizable)
-{ singelizable_interval_4_ordered_types<left_open_interval<signed_discrete_type_1> >(); }
+{ singelizable_interval_4_ordered_types<left_open_interval<signed_discrete_type_1> >(); }
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_left_open_interval_4_bicremental_types)
-{ singelizable_interval_4_bicremental_types<left_open_interval<discrete_type_4> >(); }
+{ singelizable_interval_4_bicremental_types<left_open_interval<discrete_type_4> >(); }
+
+//- coverables -----------------------------------------------------------------
+BOOST_AUTO_TEST_CASE
+(fastest_cover_right_open_interval_4_bicremental_types)
+{ coverable_asymmetric_interval_4_bicremental_types<right_open_interval<numeric_continuous_type_1> >(); }
 
+BOOST_AUTO_TEST_CASE
+(fastest_cover_left_open_interval_4_bicremental_types)
+{ coverable_asymmetric_interval_4_bicremental_types<left_open_interval<numeric_continuous_type_3> >(); }
 
 //- dyn.dis --------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE

Modified: sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp (original)
+++ sandbox/icl/libs/icl/test/fastest_interval_map_cases.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -14,7 +14,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_ctor_4_bicremental_types)
-{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_add_sub_4_bicremental_types)
@@ -22,7 +22,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_distinct_4_bicremental_types)
-{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_distinct_4_bicremental_continuous_types)
@@ -30,7 +30,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_isolate_4_bicremental_continuous_types)
-{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, int>();}
+{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_contains_4_bicremental_types)
@@ -38,7 +38,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_contains_key_objects_4_bicremental_types)
-{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_operators_4_bicremental_types)
@@ -46,7 +46,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_intersect_4_bicremental_types)
-{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, int>();}
+{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_erase_4_bicremental_types)
@@ -54,14 +54,23 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_is_disjoint_4_bicremental_types)
-{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, int>();}
+{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_flip_4_bicremental_types)
 { interval_map_flip_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_find_4_bicremental_types)
-{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, double>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_find_4_numeric_continuous_types)
+{ interval_map_find_4_numeric_continuous_types<INTERVAL_MAP, numeric_continuous_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_range_4_bicremental_types)
+{ interval_map_range_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_set_4_bicremental_types)
@@ -69,7 +78,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_inclusion_compare_4_bicremental_types)
-{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, int, partial_absorber, INTERVAL_MAP>();}
+{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, double, partial_absorber, INTERVAL_MAP>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_std_copy_via_inserter_4_bicremental_types)
@@ -77,7 +86,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_element_iter_4_discrete_types)
-{ interval_map_element_iter_4_discrete_types<discrete_type_2, int, partial_absorber, INTERVAL_MAP>();}
+{ interval_map_element_iter_4_discrete_types<discrete_type_2, double, partial_absorber, INTERVAL_MAP>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_intersects_4_bicremental_types)

Modified: sandbox/icl/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp (original)
+++ sandbox/icl/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -7,16 +7,12 @@
 +-----------------------------------------------------------------------------*/
 #define BOOST_TEST_MODULE icl::fix_icl_after_thread unit test
 #include <libs/icl/test/disable_test_warnings.hpp>
-#include <string>
-#include <boost/mpl/list.hpp>
 #include "../unit_test_unwarned.hpp"
 
-// interval instance types
-#include "../test_type_lists.hpp"
-#include "../test_value_maker.hpp"
-#include "../test_functions.hpp"
-
-#include <boost/thread.hpp>
+// #include <boost/thread.hpp> MEMO: The problem occured when using thread.hpp
+#include <boost/bind.hpp> // but is also triggered from bind.hpp alone
+ // while the cause of it is an error in the msvc-7.1 to 10.0 compilers.
+ // A minimal example is provided by test case 'cmp_msvc_value_born_error'
 #include <boost/icl/interval_map.hpp>
 #include <boost/icl/split_interval_map.hpp>
 #include <boost/icl/separate_interval_set.hpp>

Modified: sandbox/icl/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp (original)
+++ sandbox/icl/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -5,6 +5,8 @@
       (See accompanying file LICENCE.txt or copy at
            http://www.boost.org/LICENSE_1_0.txt)
 +-----------------------------------------------------------------------------*/
+//JODO REMOVE THIS TESTCASE
+
 #define BOOST_TEST_MODULE icl::fix_include_after_thread unit test
 #include <boost/config.hpp>
 #include <boost/test/unit_test.hpp>
@@ -16,7 +18,12 @@
 //like some_attribute<Type>::value in parentheses
 // ->(some_attribute<Type>::value)
 //The problem does not occur for gcc compilers.
-#include <boost/thread.hpp>
+
+// #include <boost/thread.hpp> MEMO: The problem occured when using thread.hpp
+#include <boost/bind.hpp> // but is also triggered from bind.hpp alone
+ // while the cause of it is an error in the msvc-7.1 to 10.0 compilers.
+ // A minimal example is provided by test case 'cmp_msvc_value_born_error'
+
 //--- included code ---------------------------------------
 template <class Type> struct some_attribute
 {

Modified: sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/icl/libs/icl/test/test_casual_/test_casual.cpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -8,12 +8,14 @@
 #define BOOST_TEST_MODULE icl::casual unit test
 
 #include <libs/icl/test/disable_test_warnings.hpp>
+
 #include <string>
 #include <vector>
 #include <boost/mpl/list.hpp>
 #include "../unit_test_unwarned.hpp"
 #include <boost/test/test_case_template.hpp>
 
+
 // interval instance types
 #include "../test_type_lists.hpp"
 #include "../test_value_maker.hpp"
@@ -23,6 +25,7 @@
 #include <boost/icl/gregorian.hpp>
 #include <boost/icl/ptime.hpp>
 
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 #include <boost/icl/interval_map.hpp>
 #include <boost/icl/interval_set.hpp>
 #include <boost/icl/interval.hpp>
@@ -35,66 +38,32 @@
 using namespace boost::gregorian;
 
 
-BOOST_AUTO_TEST_CASE(float_infinity)
-{
-
- typedef size_type_of<interval<float>::type>::type itv_float_size_type;
-
- BOOST_CHECK( (is_same<size_type_of<interval<float>::type>::type, std::size_t>::value) );
- BOOST_CHECK( (is_same<itv_float_size_type, std::size_t>::value) );
- BOOST_CHECK( (is_same<itv_float_size_type, unsigned int>::value) );
-
- cout << cardinality(interval<float>::closed(1,5)) << endl;
- cout << icl::infinity<size_type_of<interval<float>::type>::type>::value() << endl;
- //cout << (std::size_t)(icl::infinity<itv_float_size_type>::value) << endl;
- cout << (std::numeric_limits<unsigned int>::max)() << endl;
-
- BOOST_CHECK_EQUAL(
- cardinality(interval<float>::closed(1,5))
- , icl::infinity<itv_float_size_type>::value()
- );
-
- BOOST_CHECK_EQUAL(true, true);
-}
-
-BOOST_AUTO_TEST_CASE(lower_empty)
-{
-
-{
- icl::interval_set<int> iclset;
- iclset += interval<int>::right_open(1,5);
- icl::interval_set<int> one;
- one += 1;
- BOOST_CHECK(icl::intersects( iclset, one ));
- BOOST_CHECK(!icl::disjoint( iclset, one ));
-}
-
- BOOST_CHECK_EQUAL(true, true);
-}
-
 BOOST_AUTO_TEST_CASE(casual)
 {
- //typedef int T;
- //typedef int U;
- //typedef interval_map<T,U, total_absorber> IntervalMapT;
- //typedef interval_set<T> IntervalSetT;
- //typedef IntervalMapT::interval_type IntervalT;
-
-
- interval_set<int> iclset;
- interval<int>::type itv;
- BOOST_CHECK(is_interval_container<interval_set<int> >::value);
- BOOST_CHECK((is_same<int, typename domain_type_of<interval_set<int> >::type >::value));
-
- icl::contains(iclset, 1);
- icl::within(1, iclset);
-
- icl::intersects(iclset, 1);
- icl::intersects(iclset, itv);
-
- icl::disjoint(iclset, 1);
- icl::disjoint(iclset, itv);
-
+ typedef int T;
+ typedef int U;
+ typedef interval_map<T,U, total_absorber> IntervalMapT;
+ typedef interval_set<T> IntervalSetT;
+ typedef IntervalMapT::interval_type IntervalT;
+
+ /*
+ int i;
+ int j = int();
+ chrono::duration<int> cd1 = chrono::duration<int>();
+ chrono::duration<int> cd2(0);
+ chrono::duration<int> dur1(0);
+ chrono::duration<int> dur2, dur3, dur4;
+ dur2 = dur3 = dur4 = dur1;
+ int itg1(0);
+ int itg2, itg3, itg4;
+ itg2 = itg3 = itg4 = itg1;
+
+ cout << "uninitialized i = " << i << endl;
+ cout << "default constructed j = " << j << endl;
+ cout << (cd1==cd2 ? "eq" : "!eq") << endl;
+ cout << "chrono::duration cd1() = " << cd1 << endl;
+ cout << "chrono::duration cd2(0) = " << cd2 << endl;
+ */
 
     BOOST_CHECK_EQUAL(true, true);
 }

Modified: sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp (original)
+++ sandbox/icl/libs/icl/test/test_icl_dynamic_interval.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -28,7 +28,7 @@
 {
     typedef typename icl::interval<T>::type IntervalT;
 
- BOOST_CHECK_EQUAL( T(), icl::pred(icl::succ(T())));
+ // BOOST_CHECK_EQUAL( T(), icl::pred(icl::succ(T())));
     BOOST_CHECK_EQUAL( icl::identity_element<T>::value(), icl::pred(icl::succ(icl::identity_element<T>::value())) );
     BOOST_CHECK_EQUAL( icl::unit_element<T>::value(), icl::succ(icl::identity_element<T>::value()) );
     BOOST_CHECK_EQUAL( length(IntervalT()), icl::identity_element<typename difference_type_of<T>::type>::value() );

Modified: sandbox/icl/libs/icl/test/test_icl_interval.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_icl_interval.hpp (original)
+++ sandbox/icl/libs/icl/test/test_icl_interval.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -84,6 +84,24 @@
     BOOST_CHECK_EQUAL( icl::contains(IntervalT(MK_v(1)), MK_v(1)), true );
 }
 
+template <class IntervalT>
+void coverable_asymmetric_interval_4_bicremental_types()
+{
+ typedef typename domain_type_of<interval_traits<IntervalT> >::type T;
+ typedef typename icl::size_type_of<T>::type SizeT;
+ typedef typename icl::difference_type_of<T>::type DiffT;
+ //T t_0 = icl::identity_element<T>::value();
+ SizeT s_1 = icl::unit_element<SizeT>::value();
+ DiffT d_1 = icl::unit_element<DiffT>::value();
+
+ //JODO BOOST_CHECK( is_incremental_coverable<IntervalT>::value );
+ BOOST_CHECK( has_difference<T>::value );
+
+ BOOST_CHECK_EQUAL( icl::contains(icl::detail::unit_trail<IntervalT>(MK_v(4)), MK_v(4)), true );
+ BOOST_CHECK_EQUAL( icl::length (icl::detail::unit_trail<IntervalT>(MK_v(3))), d_1 );
+ BOOST_CHECK ( icl::touches (icl::detail::unit_trail<IntervalT>(MK_v(2)), icl::detail::unit_trail<IntervalT>(MK_v(3))) );
+}
+
 
 
 #endif // BOOST_ICL_TEST_ICL_INTERVAL_HPP_JOFA_100930

Modified: sandbox/icl/libs/icl/test/test_interval_map_cases.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_interval_map_cases.hpp (original)
+++ sandbox/icl/libs/icl/test/test_interval_map_cases.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -59,11 +59,20 @@
 BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_icl_interval_map_flip_4_bicremental_types, T, bicremental_types)
 { interval_map_flip_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
 BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_icl_interval_map_find_4_bicremental_types, T, bicremental_types)
 { interval_map_find_4_bicremental_types<INTERVAL_MAP, T, int>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_find_4_numeric_continuous_types, T, numeric_continuous_types)
+{ interval_map_find_4_numeric_continuous_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_icl_interval_map_range_4_bicremental_types, T, bicremental_types)
+{ interval_map_range_4_bicremental_types<INTERVAL_MAP, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_icl_interval_map_set_4_bicremental_types, T, bicremental_types)
 { interval_map_set_4_bicremental_types<INTERVAL_MAP, T, int>();}
 

Modified: sandbox/icl/libs/icl/test/test_interval_map_shared.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_interval_map_shared.hpp (original)
+++ sandbox/icl/libs/icl/test/test_interval_map_shared.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -35,7 +35,11 @@
     T v1 = unit_element<T>::value();
     IntervalT I0_0I(v0);
     IntervalT I1_1I(v1);
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
     IntervalT I0_1I(v0, v1, interval_bounds::closed());
+#else
+ IntervalT I0_1I = icl::interval<T>::closed(v0, v1);
+#endif
     U u1 = unit_element<U>::value();
 
     //-------------------------------------------------------------------------
@@ -204,13 +208,27 @@
     _I4_4I_u2.insert(I4_4I_u2).insert(I4_4I_u2);
     BOOST_CHECK_EQUAL( _I4_4I_u2, _I4_4I_u2_1 );
 
- BOOST_CHECK_EQUAL( cardinality(_I4_4I_u2), unit_element<typename IntervalMapT::size_type>::value() );
- BOOST_CHECK_EQUAL( _I4_4I_u2.size(), unit_element<typename IntervalMapT::size_type>::value() );
+ BOOST_CHECK_EQUAL( cardinality(_I4_4I_u2), unit_element<typename IntervalMapT::size_type>::value() );
+ BOOST_CHECK_EQUAL( _I4_4I_u2.size(), unit_element<typename IntervalMapT::size_type>::value() );
     BOOST_CHECK_EQUAL( interval_count(_I4_4I_u2), 1 );
- BOOST_CHECK_EQUAL( _I4_4I_u2.iterative_size(), 1 );
+ BOOST_CHECK_EQUAL( _I4_4I_u2.iterative_size(), 1 );
     BOOST_CHECK_EQUAL( iterative_size(_I4_4I_u2), 1 );
- BOOST_CHECK_EQUAL( hull(_I4_4I_u2).lower(), v4 );
- BOOST_CHECK_EQUAL( hull(_I4_4I_u2).upper(), v4 );
+
+ if(has_dynamic_bounds<IntervalT>::value)
+ {
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).lower(), v4 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).upper(), v4 );
+ }
+
+ if(is_discrete<T>::value)
+ {
+ if(is_same<float, T>::value)
+ {
+ BOOST_CHECK( false );
+ }
+ //BOOST_CHECK_EQUAL( icl::first(hull(_I4_4I_u2)), v4 );
+ //BOOST_CHECK_EQUAL( icl::last(hull(_I4_4I_u2)), v4 );
+ }
 
     IntervalMapT _I4_4I_u2_copy(_I4_4I_u2);
     IntervalMapT _I4_4I_u2_assigned;
@@ -246,14 +264,20 @@
     T v6 = make<T>(6);
     T v9 = make<T>(9);
     U u1 = make<U>(1);
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
     IntervalT I5_6I(v5,v6, interval_bounds::closed());
     IntervalT I5_9I(v5,v9, interval_bounds::closed());
     IntervalT I0_9I = IntervalT::closed(v0, v9);
+#else
+ IntervalT I5_6I = icl::interval<T>::closed(v5,v6);
+ IntervalT I5_9I = icl::interval<T>::closed(v5,v9);
+ IntervalT I0_9I = icl::interval<T>::closed(v0,v9);
+#endif
     typename IntervalMapT::domain_mapping_type v0_u1 = make_pair(v0, u1);
     typename IntervalMapT::domain_mapping_type v9_u1 = make_pair(v9, u1);
     typename IntervalMapT::value_type I5_6I_u1 = make_pair(I5_6I, u1);
     typename IntervalMapT::value_type I5_9I_u1 = make_pair(I5_9I, u1);
- typename IntervalMapT::value_type I0_9I_u1 = make_pair(IntervalT::closed(v0, v9), u1);
+ typename IntervalMapT::value_type I0_9I_u1 = make_pair(icl::interval<T>::closed(v0, v9), u1);
 
     BOOST_CHECK_EQUAL( IntervalMapT(I5_6I_u1).add(v0_u1).add(v9_u1),
                        IntervalMapT().add(v9_u1).add(I5_6I_u1).add(v0_u1) );
@@ -327,6 +351,8 @@
>
 void interval_map_distinct_4_bicremental_continuous_types()
 {
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::size_type size_T;
@@ -347,11 +373,11 @@
     is_1_3_5.add(v1_u1).add(v3_u1).add(v5_u1);
 
     BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
- BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
     icl::length(is_1_3_5);
- BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
+ BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
     BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
- BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
     BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
 
 
@@ -361,13 +387,14 @@
     //is_123_5 += make_pair(IntervalT::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
     //is_123_5 += make_pair<IntervalT, U>(IntervalT::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
     //USASO: unsatisfctory solution 1: explicit IntervalMapT::value_type instead of make_pair
- is_123_5 += typename IntervalMapT::value_type(IntervalT::open(v1,v3),u1);
+ is_123_5 += typename IntervalMapT::value_type(icl::interval<T>::open(v1,v3),u1);
     //USASO: unsatisfctory solution 2: not implementing mapping_type version of o=
 
     BOOST_CHECK_EQUAL( cardinality(is_123_5), icl::infinity<size_T>::value() );
     BOOST_CHECK_EQUAL( is_123_5.size(), icl::infinity<size_T>::value() );
     BOOST_CHECK_EQUAL( icl::length(is_123_5), d2 );
 
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 }
 
 template
@@ -381,6 +408,8 @@
>
 void interval_map_isolate_4_bicremental_continuous_types()
 {
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::size_type size_T;
@@ -390,9 +419,9 @@
     T v2 = make<T>(2);
     T v4 = make<T>(4);
     U u1 = make<U>(1);
- IntervalT I0_4I = IntervalT::closed(v0,v4);
- IntervalT C0_2D = IntervalT::open(v0,v2);
- IntervalT C2_4D = IntervalT::open(v2,v4);
+ IntervalT I0_4I = icl::interval<T>::closed(v0,v4);
+ IntervalT C0_2D = icl::interval<T>::open(v0,v2);
+ IntervalT C2_4D = icl::interval<T>::open(v2,v4);
     typename IntervalMapT::value_type I0_4I_u1(I0_4I,u1);
     typename IntervalMapT::value_type C0_2D_u1(C0_2D,u1);
     typename IntervalMapT::value_type C2_4D_u1(C2_4D,u1);
@@ -423,6 +452,7 @@
     BOOST_CHECK_EQUAL( iso_map, iso_map2 );
     BOOST_CHECK_EQUAL( iso_map, iso_map3 );
     BOOST_CHECK_EQUAL( iso_map, iso_map4 );
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 }
 
 
@@ -440,7 +470,10 @@
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::set_type IntervalSetT;
- IntervalMapT itv_map; itv_map.add(K_v(3,1));
+
+ IntervalMapT itv_map;
+ itv_map.add(K_v(3,1));
+
     BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(3)), true );
     BOOST_CHECK_EQUAL( icl::contains(itv_map, K_v(3,1)), true );
 
@@ -531,10 +564,10 @@
     T v7 = make<T>(7);
     T v8 = make<T>(8);
     U u1 = make<U>(1);
- typename IntervalMapT::interval_type I3_5I(IntervalT::closed(v3,v5));
- typename IntervalMapT::value_type I0_1I_u1(IntervalT::closed(v0,v1),u1);
- typename IntervalMapT::value_type I3_5I_u1(IntervalT::closed(v3,v5),u1);
- typename IntervalMapT::value_type I7_8I_u1(IntervalT::closed(v7,v8),u1);
+ typename IntervalMapT::interval_type I3_5I(icl::interval<T>::closed(v3,v5));
+ typename IntervalMapT::value_type I0_1I_u1(icl::interval<T>::closed(v0,v1),u1);
+ typename IntervalMapT::value_type I3_5I_u1(icl::interval<T>::closed(v3,v5),u1);
+ typename IntervalMapT::value_type I7_8I_u1(icl::interval<T>::closed(v7,v8),u1);
     
     IntervalMapT left, left2, right, all, section, complement;
     left.add(I0_1I_u1).add(I3_5I_u1);
@@ -581,16 +614,16 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_3D = IntervalT::right_open(v0,v3);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I1_4D = IntervalT::right_open(v1,v4);
- IntervalT I1_8D = IntervalT::right_open(v1,v8);
- IntervalT I2_7D = IntervalT::right_open(v2,v7);
- IntervalT I2_3D = IntervalT::right_open(v2,v3);
- IntervalT I5_8D = IntervalT::right_open(v5,v8);
- IntervalT I6_7D = IntervalT::right_open(v6,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I6_9D = IntervalT::right_open(v6,v9);
+ IntervalT I0_3D = icl::interval<T>::right_open(v0,v3);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I1_4D = icl::interval<T>::right_open(v1,v4);
+ IntervalT I1_8D = icl::interval<T>::right_open(v1,v8);
+ IntervalT I2_7D = icl::interval<T>::right_open(v2,v7);
+ IntervalT I2_3D = icl::interval<T>::right_open(v2,v3);
+ IntervalT I5_8D = icl::interval<T>::right_open(v5,v8);
+ IntervalT I6_7D = icl::interval<T>::right_open(v6,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I6_9D = icl::interval<T>::right_open(v6,v9);
 
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
     typename IntervalMapT::value_type I6_9D_1(I6_9D, u1);
@@ -688,22 +721,22 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_1D = IntervalT::right_open(v0,v1);
- IntervalT I0_2D = IntervalT::right_open(v0,v2);
- IntervalT I0_3D = IntervalT::right_open(v0,v3);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I1_4D = IntervalT::right_open(v1,v4);
- IntervalT I1_8D = IntervalT::right_open(v1,v8);
- IntervalT I2_4D = IntervalT::right_open(v2,v4);
- IntervalT I2_7D = IntervalT::right_open(v2,v7);
- IntervalT I2_3D = IntervalT::right_open(v2,v3);
- IntervalT I5_7D = IntervalT::right_open(v5,v7);
- IntervalT I5_8D = IntervalT::right_open(v5,v8);
- IntervalT I6_7D = IntervalT::right_open(v6,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I6_9D = IntervalT::right_open(v6,v9);
- IntervalT I7_9D = IntervalT::right_open(v7,v9);
- IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I0_1D = icl::interval<T>::right_open(v0,v1);
+ IntervalT I0_2D = icl::interval<T>::right_open(v0,v2);
+ IntervalT I0_3D = icl::interval<T>::right_open(v0,v3);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I1_4D = icl::interval<T>::right_open(v1,v4);
+ IntervalT I1_8D = icl::interval<T>::right_open(v1,v8);
+ IntervalT I2_4D = icl::interval<T>::right_open(v2,v4);
+ IntervalT I2_7D = icl::interval<T>::right_open(v2,v7);
+ IntervalT I2_3D = icl::interval<T>::right_open(v2,v3);
+ IntervalT I5_7D = icl::interval<T>::right_open(v5,v7);
+ IntervalT I5_8D = icl::interval<T>::right_open(v5,v8);
+ IntervalT I6_7D = icl::interval<T>::right_open(v6,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I6_9D = icl::interval<T>::right_open(v6,v9);
+ IntervalT I7_9D = icl::interval<T>::right_open(v7,v9);
+ IntervalT I8_9D = icl::interval<T>::right_open(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
@@ -805,12 +838,12 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_1D = IntervalT::right_open(v0,v1);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I3_6D = IntervalT::right_open(v3,v6);
- IntervalT I5_7D = IntervalT::right_open(v5,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I0_1D = icl::interval<T>::right_open(v0,v1);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I3_6D = icl::interval<T>::right_open(v3,v6);
+ IntervalT I5_7D = icl::interval<T>::right_open(v5,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I8_9D = icl::interval<T>::right_open(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);
@@ -1105,7 +1138,8 @@
 void interval_map_find_4_bicremental_types()
 {
     typedef IntervalMap<T,U> IntervalMapT;
- typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::const_iterator c_iterator;
 
     typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
     std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
@@ -1113,16 +1147,144 @@
 
     IntervalMapT map_a;
     map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
-
- typename IntervalMapT::const_iterator found = map_a.find(MK_v(6));
-
- BOOST_CHECK_EQUAL( found->second, MK_u(3) );
+ // {(1 3) [6 8)[8 9)[9 11)
+ // 1 3 4 3
+ // 5? 6?
+ c_iterator found1 = map_a.find(MK_v(6));
+ c_iterator found2 = icl::find(map_a, MK_v(6));
+
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(3) );
     BOOST_CHECK_EQUAL( map_a(MK_v(6)), MK_u(3) );
 
- found = map_a.find(MK_v(5));
+ found1 = map_a.find(MK_v(5));
 
- BOOST_CHECK_EQUAL( found == map_a.end(), true );
+ BOOST_CHECK_EQUAL( found1 == map_a.end(), true );
     BOOST_CHECK_EQUAL( map_a(MK_v(5)), MK_u(0) );
+ BOOST_CHECK_EQUAL( map_a(MK_v(8)), MK_u(4) );
+
+ //LAW map c; key k: k in dom(c) => contains(c, (k, find(c, k)->second))
+ BOOST_CHECK( icl::contains(map_a, K_v(2, icl::find(map_a, MK_v(2))->second)) );
+ BOOST_CHECK( icl::contains(map_a, K_v(11, map_a.find(MK_v(11))->second)) );
+
+ BOOST_CHECK( icl::contains(map_a, MK_v(2)) );
+ BOOST_CHECK( icl::contains(map_a, MK_v(10)) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(1)) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(3)) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(12)) );
+
+ BOOST_CHECK( icl::intersects(map_a, MK_v(2)) );
+ BOOST_CHECK( icl::intersects(map_a, MK_v(10)) );
+ BOOST_CHECK( !icl::intersects(map_a, MK_v(1)) );
+ BOOST_CHECK( !icl::intersects(map_a, MK_v(3)) );
+ BOOST_CHECK( !icl::intersects(map_a, MK_v(12)) );
+}
+
+
+template
+<
+#if (defined(__GNUC__) && (__GNUC__ < 4)) //MEMO Can be simplified, if gcc-3.4 is obsolete
+ ICL_IntervalMap_TEMPLATE(T,U,Traits,partial_absorber) IntervalMap,
+#else
+ ICL_IntervalMap_TEMPLATE(_T,_U,Traits,partial_absorber) IntervalMap,
+#endif
+ class T, class U
+>
+void interval_map_find_4_numeric_continuous_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::const_iterator c_iterator;
+
+ T q_1_2 = MK_v(1) / MK_v(2);
+ T q_3_2 = MK_v(3) / MK_v(2);
+ T q_1_3 = MK_v(1) / MK_v(3);
+ T q_2_3 = MK_v(2) / MK_v(3);
+ T q_4_3 = MK_v(4) / MK_v(3);
+ T q_5_3 = MK_v(5) / MK_v(3);
+
+ IntervalMapT map_a;
+ map_a.add(MK_seg(IntervalT(q_1_3, q_2_3), 1)).add(MK_seg(IntervalT(q_4_3, q_5_3), 2));
+ // {[1/3 2/3) [4/3 5/3)}
+ // 1 2
+
+ c_iterator found1 = map_a.find(q_1_2);
+ c_iterator found2 = icl::find(map_a, q_1_2);
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(1) );
+
+ found1 = map_a.find(q_3_2);
+ found2 = icl::find(map_a, q_3_2);
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(2) );
+
+ if( mpl::or_<mpl::not_<is_static_left_open<IntervalT> >, is_signed<T> >::value )
+ {
+ found1 = map_a.find(MK_v(0));
+ found2 = icl::find(map_a, MK_v(0));
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK ( found1 == map_a.end() );
+ }
+
+ found1 = map_a.find(MK_v(1));
+ found2 = icl::find(map_a, MK_v(1));
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK ( found1 == map_a.end() );
+
+ if( mpl::or_<mpl::not_<is_static_left_open<IntervalT> >, is_signed<T> >::value )
+ {
+ BOOST_CHECK( !icl::contains(map_a, MK_v(0)) );
+ }
+ BOOST_CHECK( icl::contains(map_a, q_1_2) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(1)) );
+ BOOST_CHECK( icl::contains(map_a, q_3_2) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(2)) );
+
+}
+
+
+template
+<
+#if (defined(__GNUC__) && (__GNUC__ < 4)) //MEMO Can be simplified, if gcc-3.4 is obsolete
+ ICL_IntervalMap_TEMPLATE(T,U,Traits,partial_absorber) IntervalMap,
+#else
+ ICL_IntervalMap_TEMPLATE(_T,_U,Traits,partial_absorber) IntervalMap,
+#endif
+ class T, class U
+>
+void interval_map_range_4_bicremental_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::const_iterator c_iterator;
+
+ typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+ std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
+ mapping_pair<T,U> map_pair = K_v(4,3);
+
+ IntervalMapT map_a;
+ map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+ // {(1 3) [6 8)[8 9)[9 11)
+ // 1 3 4 3
+ // [2 7) := itv
+
+ IntervalT itv = I_D(2, 7);
+ c_iterator lwb1 = icl::find(map_a, itv);
+ c_iterator lwb2 = map_a.lower_bound(itv);
+
+ BOOST_CHECK ( lwb1 == lwb2 );
+ BOOST_CHECK_EQUAL( lwb1->second, lwb2->second );
+ BOOST_CHECK_EQUAL( lwb1->second, MK_u(1) );
+
+ c_iterator upb1 = map_a.upper_bound(itv);
+ BOOST_CHECK_EQUAL( upb1->second, MK_u(4) );
+
+ std::pair<c_iterator,c_iterator> exterior = map_a.equal_range(itv);
+ BOOST_CHECK ( lwb1 == exterior.first );
+ BOOST_CHECK ( upb1 == exterior.second );
 }
 
 
@@ -1334,7 +1496,7 @@
 
     BOOST_CHECK( icl::is_interval_container<IntervalMapT>::value );
     BOOST_CHECK( icl::has_domain_type<IntervalMapT>::value );
- BOOST_CHECK( (is_same<T, typename domain_type_of<IntervalMapT>::type>::value) );
+ BOOST_CHECK( (boost::is_same<T, typename domain_type_of<IntervalMapT>::type>::value) );
 
     BOOST_CHECK( icl::intersects(map_a, MK_v(2) ) );
     BOOST_CHECK( icl::intersects(map_a, MK_v(11)) );
@@ -1349,9 +1511,17 @@
     //-------------------------------------+
     // (1 3) [6 8)[8 9)[9 11]
     // 1 3 4 3
- //mapping_pair<T,U> map_pair_2_1 = K_v(2,1);
- //BOOST_CHECK( icl::intersects(map_a, map_pair_2_1 ) ); //JODO
-
+ mapping_pair<T,U> map_pair_2_1 = K_v(2,1);
+ BOOST_CHECK( icl::intersects(map_a, map_pair_2_1 ) );
+ BOOST_CHECK( icl::intersects(map_a, K_v(6,3) ) );
+ BOOST_CHECK( icl::intersects(map_a, IDv(6,8,3) ) );
+ BOOST_CHECK( icl::intersects(map_a, CIv(8,11,3) ) );
+ BOOST_CHECK( icl::intersects(map_a, IIv(6,11,3) ) );
+ BOOST_CHECK( icl::intersects(map_a, IIv(6,11,5) ) );
+ BOOST_CHECK(!icl::intersects(map_a, IDv(4,6,5) ) );
+
+ BOOST_CHECK( icl::disjoint(map_a, IDv(4,6,5) ) );
+ BOOST_CHECK(!icl::disjoint(map_a, IDv(0,12,1) ) );
 }
 
 

Modified: sandbox/icl/libs/icl/test/test_interval_set_shared.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_interval_set_shared.hpp (original)
+++ sandbox/icl/libs/icl/test/test_interval_set_shared.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -681,6 +681,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
+ typedef typename IntervalSetT::const_iterator c_iterator;
 
     IntervalT itv = I_D(3,5);
 
@@ -694,6 +695,31 @@
     found = set_a.find(MK_v(5));
 
     BOOST_CHECK_EQUAL( found == set_a.end(), true );
+
+ c_iterator found1 = set_a.find(MK_v(6));
+ c_iterator found2 = icl::find(set_a, MK_v(6));
+
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( *found1, *found2 );
+ BOOST_CHECK_EQUAL( *found1, I_I(6,11) );
+
+ found1 = set_a.find(MK_v(5));
+
+ BOOST_CHECK_EQUAL( found1 == set_a.end(), true );
+
+ //LAW map c; key k: k in dom(c) => contains(c, *find(c, k))
+ BOOST_CHECK( icl::contains(set_a, *icl::find(set_a, MK_v(2))) );
+ BOOST_CHECK( icl::contains(set_a, *set_a.find(MK_v(11))) );
+
+ BOOST_CHECK( icl::contains(set_a, MK_v(2)) );
+ BOOST_CHECK( icl::contains(set_a, MK_v(10)) );
+ BOOST_CHECK( !icl::contains(set_a, MK_v(1)) );
+ BOOST_CHECK( !icl::contains(set_a, MK_v(3)) );
+
+ BOOST_CHECK( icl::intersects(set_a, MK_v(2)) );
+ BOOST_CHECK( icl::intersects(set_a, MK_v(10)) );
+ BOOST_CHECK( !icl::intersects(set_a, MK_v(1)) );
+ BOOST_CHECK( !icl::intersects(set_a, MK_v(3)) );
 }
 
 

Modified: sandbox/icl/libs/icl/test/test_type_lists.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_type_lists.hpp (original)
+++ sandbox/icl/libs/icl/test/test_type_lists.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -9,6 +9,7 @@
 #define BOOST_ICL_TEST_TYPE_LISTS_HPP_JOFA_080916
 
 //#define BOOST_ICL_TEST_XINT
+//#define BOOST_ICL_TEST_CHRONO
 
 #include <boost/mpl/list.hpp>
 
@@ -20,6 +21,11 @@
 #include <boost/icl/xint.hpp>
 #endif
 
+#ifdef BOOST_ICL_TEST_CHRONO
+//JODO not working: #define BOOST_CHRONO_INLINED
+#include <boost/icl/chrono.hpp>
+#endif
+
 #include <boost/icl/rational.hpp>
 
 
@@ -31,10 +37,8 @@
 #else
 typedef boost::posix_time::ptime boost_posix_time_ptime;
 typedef boost::posix_time::time_duration boost_posix_time_duration;
-typedef int boost_gregorian_date;
-typedef int boost_gregorian_date_duration;
-//typedef boost::gregorian::date boost_gregorian_date; //JODO URG REV
-//typedef boost::gregorian::date_duration boost_gregorian_date_duration;
+typedef boost::gregorian::date boost_gregorian_date;
+typedef boost::gregorian::date_duration boost_gregorian_date_duration;
 #endif
 
 typedef ::boost::mpl::list<
@@ -46,6 +50,10 @@
     ,boost::xint::integer
     ,boost::rational<boost::xint::integer>
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<int>
+ ,boost::chrono::duration<double>
+#endif
     ,boost_posix_time_ptime
     ,boost_posix_time_duration
     ,boost_gregorian_date
@@ -71,6 +79,10 @@
     ,boost::xint::integer
     ,boost::rational<boost::xint::integer>
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<int>
+ ,boost::chrono::duration<float>
+#endif
> signed_bicremental_types;
 
 typedef int signed_bicremental_type_1;
@@ -90,6 +102,9 @@
 #ifdef BOOST_ICL_TEST_XINT
     ,boost::rational<boost::xint::integer>
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<double>
+#endif
> bicremental_continuous_types;
 
 typedef float bicremental_continuous_type_1;
@@ -120,6 +135,9 @@
 #ifdef BOOST_ICL_TEST_XINT
     ,boost::xint::integer
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<unsigned short>
+#endif
     ,boost_posix_time_ptime
     ,boost_posix_time_ptime
     ,boost_posix_time_duration
@@ -148,6 +166,9 @@
 #ifdef BOOST_ICL_TEST_XINT
     ,boost::rational<boost::xint::integer>
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<long double>
+#endif
> numeric_continuous_types;
 
 typedef double numeric_continuous_type_1;
@@ -161,6 +182,9 @@
 #ifdef BOOST_ICL_TEST_XINT
     ,boost::rational<boost::xint::integer>
 #endif
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<double>
+#endif
     ,std::string
> continuous_types;
 
@@ -178,12 +202,16 @@
 #ifdef BOOST_ICL_TEST_XINT
     ,boost::xint::integer
 #endif
- ,std::string
+#ifdef BOOST_ICL_TEST_CHRONO
+ ,boost::chrono::duration<short>
+ ,boost::chrono::duration<long double>
+#endif
     ,boost_posix_time_ptime
     ,boost_posix_time_duration
     ,boost_gregorian_date
     ,boost_gregorian_date_duration
     ,int*
+ ,std::string
> ordered_types;
 
 typedef int ordered_type_1;

Modified: sandbox/icl/libs/icl/test/test_value_maker.hpp
==============================================================================
--- sandbox/icl/libs/icl/test/test_value_maker.hpp (original)
+++ sandbox/icl/libs/icl/test/test_value_maker.hpp 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -133,11 +133,15 @@
     typedef typename ItvMapT::domain_mapping_type domain_mapping_type;
     typedef std::pair<domain_type, codomain_type> std_pair_type;
 
+ static segment_type mk_segment(const interval_type& inter_val, int val)
+ {
+ return segment_type(inter_val, test_value<codomain_type>::make(val));
+ }
+
+ /*CL?
     static interval_type interval_(int lower, int upper, int bounds = 2)
     {
- return interval_type(test_value<domain_type>::make(lower),
- test_value<domain_type>::make(upper),
- interval_bounds(static_cast<bound_type>(bounds)));
+ return segment_type(inter_val, test_value<codomain_type>::make(val));
     }
 
     static segment_type val_pair(int lower, int upper, int val, int bounds = 2)
@@ -145,6 +149,7 @@
         return segment_type( interval_(lower, upper, static_cast<bound_type>(bounds)),
                              test_value<codomain_type>::make(val) );
     }
+ */
 
     static domain_mapping_type map_pair(int key, int val)
     {
@@ -178,13 +183,15 @@
 
 // Very short value denotation for interval value pairs
 // Assumption typename IntervalMapT existes in scope
-#define IIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_closed)
-#define IDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_right_open)
-#define CIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_left_open)
-#define CDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_open)
+#define IIv(low,up,val) map_val<IntervalMapT>::mk_segment(I_I(low,up), val)
+#define IDv(low,up,val) map_val<IntervalMapT>::mk_segment(I_D(low,up), val)
+#define CIv(low,up,val) map_val<IntervalMapT>::mk_segment(C_I(low,up), val)
+#define CDv(low,up,val) map_val<IntervalMapT>::mk_segment(C_D(low,up), val)
 #define K_v(key,val) map_val<IntervalMapT>::map_pair(key,val)
 #define sK_v(key,val) map_val<IntervalMapT>::std_pair(key,val)
 
+#define MK_seg(itv,val) map_val<IntervalMapT>::mk_segment(itv, val)
+
 
 }} // namespace boost icl
 

Modified: sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln
==============================================================================
--- sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln (original)
+++ sandbox/icl/libs/icl/test/vc9_icl_fast_tests.sln 2011-03-04 06:55:32 EST (Fri, 04 Mar 2011)
@@ -61,6 +61,12 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_cmp_clang_ttp_passing", "cmp_clang_ttp_passing_\vc9_cmp_clang_ttp_passing.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_cmp_clang_ttp_passing2", "cmp_clang_ttp_passing2_\vc9_cmp_clang_ttp_passing2.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_use_case", "use_case_\vc9_use_case.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8DAA9FA0}"
+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
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -187,6 +193,18 @@
                 {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Release|Win32.ActiveCfg = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA3}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA3}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA3}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8DAA9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8DAA9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8DAA9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8DAA9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {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
         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