$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r65937 - in sandbox/itl: boost/itl boost/itl/concept boost/itl/detail boost/itl/type_traits boost/itl_xt libs/itl/example/boost_party_ libs/itl/example/custom_interval_ libs/itl/example/interval_ libs/itl/example/party_ libs/itl/test libs/itl/test/fastest_itl_interval_ libs/itl/test/test_casual_ libs/itl/test/test_itl_interval_
From: afojgo_at_[hidden]
Date: 2010-10-13 09:19:51
Author: jofaber
Date: 2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
New Revision: 65937
URL: http://svn.boost.org/trac/boost/changeset/65937
Log:
Adapted some tests for the new interval concept. Stable{msvc-9.0, gcc-3.4.4}
Text files modified: 
   sandbox/itl/boost/itl/closed_interval.hpp                                |     2                                         
   sandbox/itl/boost/itl/concept/interval.hpp                               |   165 +++++++++++-----                        
   sandbox/itl/boost/itl/concept/interval_bounds.hpp                        |    32 +++                                     
   sandbox/itl/boost/itl/continuous_interval.hpp                            |     2                                         
   sandbox/itl/boost/itl/detail/interval_set_algo.hpp                       |     2                                         
   sandbox/itl/boost/itl/discrete_interval.hpp                              |     2                                         
   sandbox/itl/boost/itl/interval.hpp                                       |     4                                         
   sandbox/itl/boost/itl/interval_base_map.hpp                              |     2                                         
   sandbox/itl/boost/itl/interval_bounds.hpp                                |    12                                         
   sandbox/itl/boost/itl/left_open_interval.hpp                             |     6                                         
   sandbox/itl/boost/itl/open_interval.hpp                                  |     2                                         
   sandbox/itl/boost/itl/right_open_interval.hpp                            |     6                                         
   sandbox/itl/boost/itl/type_traits/interval_type_default.hpp              |   131 +++++++++++++                           
   sandbox/itl/boost/itl/type_traits/is_interval.hpp                        |    36 +++                                     
   sandbox/itl/boost/itl_xt/bits_gentor.hpp                                 |     5                                         
   sandbox/itl/boost/itl_xt/itvgentor.hpp                                   |     9                                         
   sandbox/itl/boost/itl_xt/map_segment_gentor.hpp                          |     4                                         
   sandbox/itl/boost/itl_xt/mapgentor.hpp                                   |     4                                         
   sandbox/itl/boost/itl_xt/numbergentor.hpp                                |    20 +                                       
   sandbox/itl/boost/itl_xt/seqgentor.hpp                                   |     4                                         
   sandbox/itl/boost/itl_xt/setgentor.hpp                                   |     4                                         
   sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp                |     8                                         
   sandbox/itl/libs/itl/example/custom_interval_/custom_interval.cpp        |     8                                         
   sandbox/itl/libs/itl/example/interval_/vc9_interval.vcproj               |     4                                         
   sandbox/itl/libs/itl/example/party_/party.cpp                            |    10                                         
   sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp |    62 +++---                                  
   sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp                   |    85 ++++++--                                
   sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp               |     6                                         
   sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp                 |     2                                         
   sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp                  |    37 +++                                     
   sandbox/itl/libs/itl/test/test_itl_interval.hpp                          |   397 ----------------------------------------
   sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp       |   127 ++++++++----                            
   sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp                   |   369 +++++++++++++++++++++++-------------    
   sandbox/itl/libs/itl/test/test_laws.hpp                                  |     4                                         
   sandbox/itl/libs/itl/test/test_value_maker.hpp                           |     8                                         
   35 files changed, 834 insertions(+), 747 deletions(-)
Modified: sandbox/itl/boost/itl/closed_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/closed_interval.hpp	(original)
+++ sandbox/itl/boost/itl/closed_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -93,7 +93,7 @@
 struct interval_bound_type< closed_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_closed);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_closed);
 };
 
 template <class DomainT, ITL_COMPARE Compare>
Modified: sandbox/itl/boost/itl/concept/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/interval.hpp	(original)
+++ sandbox/itl/boost/itl/concept/interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -353,7 +353,6 @@
                     upper(object) ;
 }
 
-
 //------------------------------------------------------------------------------
 template<class Type>
 typename enable_if<has_dynamic_bounds<Type>, 
@@ -394,11 +393,25 @@
                                   object.bounds().reverse_right()); 
 }
 
+//- bounds ---------------------------------------------------------------------
+template<class Type>
+inline typename enable_if<has_dynamic_bounds<Type>, interval_bounds>::type
+bounds(const Type& object)
+{
+    return object.bounds();
+}
+
+template<class Type>
+inline typename enable_if<has_static_bounds<Type>, interval_bounds>::type
+bounds(const Type&)
+{
+    return interval_bounds(interval_bound_type<Type>::value);
+}
+
 
 //==============================================================================
-//= Containedness
+//= Emptieness
 //==============================================================================
-//- is_empty -------------------------------------------------------------------
 /** Is the interval empty? */
 template<class Type>
 typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
@@ -450,20 +463,109 @@
             && object.bounds() != interval_bounds::closed()    );
 }
 
+//==============================================================================
+//= Orederings, containedness (non empty)
+//==============================================================================
+namespace non_empty
+{
+
+    template<class Type>
+    inline typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
+    exclusive_less(const Type& left, const Type& right)
+    { 
+        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
+        return domain_less_equal<Type>(upper(left), lower(right)); 
+    }
+
+    template<class Type>
+    inline typename boost::enable_if<is_universal_interval<Type>, bool>::type
+    exclusive_less(const Type& left, const Type& right)
+    { 
+        return left.exclusive_less(right); 
+    }
+
+    template<class Type>
+    inline typename boost::enable_if<is_discrete_interval<Type>, bool>::type
+    exclusive_less(const Type& left, const Type& right)
+    { 
+        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
+        return domain_less<Type>(last(left), first(right)); 
+    }
+
+    template<class Type>
+    inline typename boost::
+    enable_if<has_symmetric_bounds<Type>, bool>::type
+    exclusive_less(const Type& left, const Type& right)
+    { 
+        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
+        return domain_less<Type>(last(left), first(right)); 
+    }
+
+    template<class Type>
+    inline typename boost::enable_if<is_continuous_interval<Type>, bool>::type
+    exclusive_less(const Type& left, const Type& right)
+    { 
+        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
+        return     domain_less <Type>(left.upper(), right.lower())
+            || (   domain_equal<Type>(left.upper(), right.lower())
+                && inner_bounds(left,right) != interval_bounds::open() );
+    }
+
+    template<class Type>
+    inline typename boost::enable_if<is_interval<Type>, bool>::type
+    contains(const Type& super, const Type& sub)
+    { 
+        return lower_less_equal(super,sub) && upper_less_equal(sub,super);
+    }
+
+
+} //namespace non_empty
+
+
 //- contains -------------------------------------------------------------------
 template<class Type>
-typename boost::enable_if<is_interval<Type>, bool>::type
+inline typename boost::enable_if<is_interval<Type>, bool>::type
 contains(const Type& super, const Type& sub)
 { 
-    return lower_less_equal(super,sub) && upper_less_equal(sub,super);
+    return itl::is_empty(sub) || non_empty::contains(super, sub);
 }
 
 template<class Type>
-typename boost::enable_if<is_interval<Type>, bool>::type
+typename boost::enable_if<is_discrete_static<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+    return domain_less_equal<Type>(itl::first(super), element                  ) 
+        && domain_less_equal<Type>(                   element, itl::last(super));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_left_open<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+    return domain_less      <Type>(itl::lower(super), element                   ) 
+        && domain_less_equal<Type>(                   element, itl::upper(super));
+}
+
+template<class Type>
+typename boost::enable_if<is_continuous_right_open<Type>, bool>::type
+contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
+{
+    return domain_less_equal<Type>(itl::lower(super), element                   ) 
+        && domain_less      <Type>(                   element, itl::upper(super));
+}
+
+template<class Type>
+typename boost::enable_if<has_dynamic_bounds<Type>, bool>::type
 contains(const Type& super, const typename interval_traits<Type>::domain_type& element)
 {
-    return domain_less_equal<Type>(super.lower(), element) 
-        && domain_less_equal<Type>(element, super.upper());
+    return
+        (is_left_closed(super.bounds())  
+            ? domain_less_equal<Type>(super.lower(), element) 
+            :       domain_less<Type>(super.lower(), element))
+    &&
+        (is_right_closed(super.bounds()) 
+            ? domain_less_equal<Type>(element, super.upper()) 
+            :       domain_less<Type>(element, super.upper()));
 }
 
 //- within ---------------------------------------------------------------------
@@ -524,53 +626,6 @@
 }
 
 
-namespace non_empty
-{
-
-    template<class Type>
-    inline typename boost::enable_if<is_asymmetric_interval<Type>, bool>::type
-    exclusive_less(const Type& left, const Type& right)
-    { 
-        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
-        return domain_less_equal<Type>(upper(left), lower(right)); 
-    }
-
-    template<class Type>
-    inline typename boost::enable_if<is_universal_interval<Type>, bool>::type
-    exclusive_less(const Type& left, const Type& right)
-    { 
-        return left.exclusive_less(right); 
-    }
-
-    template<class Type>
-    inline typename boost::enable_if<is_discrete_interval<Type>, bool>::type
-    exclusive_less(const Type& left, const Type& right)
-    { 
-        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
-        return domain_less<Type>(last(left), first(right)); 
-    }
-
-    template<class Type>
-    inline typename boost::
-    enable_if<has_symmetric_bounds<Type>, bool>::type
-    exclusive_less(const Type& left, const Type& right)
-    { 
-        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
-        return domain_less<Type>(last(left), first(right)); 
-    }
-
-    template<class Type>
-    inline typename boost::enable_if<is_continuous_interval<Type>, bool>::type
-    exclusive_less(const Type& left, const Type& right)
-    { 
-        BOOST_ASSERT(!(itl::is_empty(left) || itl::is_empty(right)));
-        return     domain_less <Type>(left.upper(), right.lower())
-            || (   domain_equal<Type>(left.upper(), right.lower())
-                && inner_bounds(left,right) != interval_bounds::open() );
-    }
-
-} //namespace non_empty
-
 //------------------------------------------------------------------------------
 template<class Type>
 typename boost::enable_if<has_static_bounds<Type>, bool>::type
Modified: sandbox/itl/boost/itl/concept/interval_bounds.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/interval_bounds.hpp	(original)
+++ sandbox/itl/boost/itl/concept/interval_bounds.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -9,6 +9,8 @@
 #define BOOST_ITL_CONCEPT_INTERVAL_BOUNDS_HPP_JOFA_100927
 
 #include <boost/itl/interval_bounds.hpp>
+#include <boost/itl/type_traits/is_discrete.hpp>
+#include <boost/itl/type_traits/is_numeric.hpp>
 
 namespace boost{namespace itl
 {
@@ -78,6 +80,36 @@
 inline std::string right_bracket(interval_bounds bounds)
 { return is_right_closed(bounds) ? "]" : ")"; }
 
+template <class Type>
+inline typename enable_if<is_discrete<Type>, Type>::type
+shift_lower(interval_bounds decl, interval_bounds repr, const Type& low)
+{
+    if(is_left_closed(decl) && !is_left_closed(repr))
+    {
+        BOOST_ASSERT((numeric_minimum<Type, is_numeric<Type>::value >::is_less_than(low) )); 
+        return itl::pred(low);
+    }
+    else if(!is_left_closed(decl) && is_left_closed(repr)) 
+        return itl::succ(low);
+    else 
+        return low;
+}
+
+template <class Type>
+inline typename enable_if<is_discrete<Type>, Type>::type
+shift_upper(interval_bounds decl, interval_bounds repr, const Type& up)
+{
+    if(!is_right_closed(decl) && is_right_closed(repr))
+    {
+        BOOST_ASSERT((numeric_minimum<Type, is_numeric<Type>::value >::is_less_than(up) )); 
+        return itl::pred(up);
+    }
+    else if(is_right_closed(decl) && !is_right_closed(repr)) 
+        return itl::succ(up);
+    else 
+        return up;
+}
+
 template<class CharType, class CharTraits>
 std::basic_ostream<CharType, CharTraits>& operator <<
   (std::basic_ostream<CharType, CharTraits> &stream, 
Modified: sandbox/itl/boost/itl/continuous_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/continuous_interval.hpp	(original)
+++ sandbox/itl/boost/itl/continuous_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -141,7 +141,7 @@
 struct interval_bound_type< continuous_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::dynamic);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic);
 };
 
 template <class DomainT, ITL_COMPARE Compare> 
Modified: sandbox/itl/boost/itl/detail/interval_set_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/interval_set_algo.hpp	(original)
+++ sandbox/itl/boost/itl/detail/interval_set_algo.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -347,7 +347,7 @@
 
     iterator first_ = object.lower_bound(addend);
     //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val));
-	iterator second_= boost::next(first_), end_ = boost::next(last_);
+    iterator second_= boost::next(first_), end_ = boost::next(last_);
 
     interval_type left_resid  = right_subtract(key_value<Type>(first_), addend);
     interval_type right_resid =  left_subtract(key_value<Type>(last_) , addend);
Modified: sandbox/itl/boost/itl/discrete_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/discrete_interval.hpp	(original)
+++ sandbox/itl/boost/itl/discrete_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -137,7 +137,7 @@
 struct interval_bound_type< discrete_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::dynamic);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic);
 };
 
 template <class DomainT, ITL_COMPARE Compare> 
Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp	(original)
+++ sandbox/itl/boost/itl/interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -178,11 +178,11 @@
 
     /** Rightopen interval <tt>[low,up)</tt> */
     static interval right_open(const DomainT& low, const DomainT& up)
-	{ return interval(low, up, itl::right_open_bounded); }
+    { return interval(low, up, itl::right_open_bounded); }
 
     /** Leftopen interval <tt>(low,up]</tt> */
     static interval left_open(const DomainT& low, const DomainT& up)
-	{ return interval(low, up, itl::left_open_bounded); }
+    { return interval(low, up, itl::left_open_bounded); }
 
     /** Open interval <tt>(low,up)</tt> */
     static interval open(const DomainT& low, const DomainT& up)
Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp	(original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -1059,7 +1059,7 @@
     ::insert_main(const interval_type& inter_val, const CodomainT& co_val, 
                   iterator& it_, const iterator& last_)
 {
-	iterator end_   = boost::next(last_);
+    iterator end_   = boost::next(last_);
     iterator prior_ = it_, inserted_;
     if(prior_ != this->_map.end())
         --prior_;
Modified: sandbox/itl/boost/itl/interval_bounds.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_bounds.hpp	(original)
+++ sandbox/itl/boost/itl/interval_bounds.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -19,17 +19,17 @@
 class interval_bounds
 {
 public:
-    BOOST_STATIC_CONSTANT(bound_type, static_open      = 0);
+    BOOST_STATIC_CONSTANT(bound_type, static_open       = 0);
     BOOST_STATIC_CONSTANT(bound_type, static_left_open  = 1);
     BOOST_STATIC_CONSTANT(bound_type, static_right_open = 2);
-    BOOST_STATIC_CONSTANT(bound_type, static_closed    = 3);
-    BOOST_STATIC_CONSTANT(bound_type, dynamic          = 4);
-    BOOST_STATIC_CONSTANT(bound_type, undefined        = 5);
+    BOOST_STATIC_CONSTANT(bound_type, static_closed     = 3);
+    BOOST_STATIC_CONSTANT(bound_type, dynamic           = 4);
+    BOOST_STATIC_CONSTANT(bound_type, undefined         = 5);
 
-    BOOST_STATIC_CONSTANT(bound_type, _open      = 0);
+    BOOST_STATIC_CONSTANT(bound_type, _open       = 0);
     BOOST_STATIC_CONSTANT(bound_type, _left_open  = 1);
     BOOST_STATIC_CONSTANT(bound_type, _right_open = 2);
-    BOOST_STATIC_CONSTANT(bound_type, _closed    = 3);
+    BOOST_STATIC_CONSTANT(bound_type, _closed     = 3);
 
     BOOST_STATIC_CONSTANT(bound_type, _right     = 1);
     BOOST_STATIC_CONSTANT(bound_type, _left      = 2);
Modified: sandbox/itl/boost/itl/left_open_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/left_open_interval.hpp	(original)
+++ sandbox/itl/boost/itl/left_open_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -5,8 +5,8 @@
       (See accompanying file LICENCE.txt or copy at
            http://www.boost.org/LICENSE_1_0.txt)
 +-----------------------------------------------------------------------------*/
-#ifndef BOOST_ITL_LEFTOPEN_INTERVAL_HPP_JOFA_100930
-#define BOOST_ITL_LEFTOPEN_INTERVAL_HPP_JOFA_100930
+#ifndef BOOST_ITL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930
+#define BOOST_ITL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930
 
 #include <functional>
 #include <boost/concept/assert.hpp>
@@ -94,7 +94,7 @@
 struct interval_bound_type< left_open_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_left_open);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_left_open);
 };
 
 template <class DomainT, ITL_COMPARE Compare>
Modified: sandbox/itl/boost/itl/open_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/open_interval.hpp	(original)
+++ sandbox/itl/boost/itl/open_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -94,7 +94,7 @@
 struct interval_bound_type< open_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_open);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_open);
 };
 
 template <class DomainT, ITL_COMPARE Compare>
Modified: sandbox/itl/boost/itl/right_open_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/right_open_interval.hpp	(original)
+++ sandbox/itl/boost/itl/right_open_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -5,8 +5,8 @@
       (See accompanying file LICENCE.txt or copy at
            http://www.boost.org/LICENSE_1_0.txt)
 +-----------------------------------------------------------------------------*/
-#ifndef BOOST_ITL_RIGHTOPEN_INTERVAL_HPP_JOFA_100323
-#define BOOST_ITL_RIGHTOPEN_INTERVAL_HPP_JOFA_100323
+#ifndef BOOST_ITL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323
+#define BOOST_ITL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323
 
 #include <functional>
 #include <boost/concept/assert.hpp>
@@ -93,7 +93,7 @@
 struct interval_bound_type< right_open_interval<DomainT,Compare> >
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_right_open);
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open);
 };
 
 template <class DomainT, ITL_COMPARE Compare>
Modified: sandbox/itl/boost/itl/type_traits/interval_type_default.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/interval_type_default.hpp	(original)
+++ sandbox/itl/boost/itl/type_traits/interval_type_default.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -21,14 +21,25 @@
 
 namespace boost{ namespace itl
 {
+
     template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)> 
     struct interval_type_default
     {
 #ifdef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
         typedef
             typename mpl::if_< is_discrete<DomainT>
+#  ifdef BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT 
+                             , BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT<DomainT,Compare>
+#  else
+                             , right_open_interval<DomainT,Compare>
+#  endif
+
+#  ifdef BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT 
+                             , BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT<DomainT,Compare> 
+#  else
                              , right_open_interval<DomainT,Compare>
-                             , right_open_interval<DomainT,Compare> >::type type;
+#  endif
+                             >::type type;
 #else
         typedef
             typename mpl::if_< is_discrete<DomainT>
@@ -37,6 +48,124 @@
 #endif
     };
 
+
+//==============================================================================
+//JODO move?
+    template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)> 
+    struct _interval
+    {
+        typedef typename interval_type_default<DomainT>::type interval_type;
+        typedef interval_type type;
+
+#ifdef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
+        static inline interval_type open(const DomainT& low, const DomainT& up)
+        {
+            return 
+                static_interval
+                < interval_type                // if the domain_type is discrete ...
+                , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+                , interval_bounds::static_open // 'pretended' bounds will be transformed to
+                , interval_bound_type<interval_type>::value // the represented bounds
+                >
+                ::construct(low, up); 
+        }
+
+        static inline interval_type left_open(const DomainT& low, const DomainT& up)
+        {
+            return 
+                static_interval
+                < interval_type
+                , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+                , interval_bounds::static_left_open
+                , interval_bound_type<interval_type>::value
+                >
+                ::construct(low, up); 
+        }
+
+        static inline interval_type right_open(const DomainT& low, const DomainT& up)
+        {
+            return 
+                static_interval
+                < interval_type
+                , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+                , interval_bounds::static_right_open
+                , interval_bound_type<interval_type>::value
+                >
+                ::construct(low, up); 
+        }
+
+        static inline interval_type closed(const DomainT& low, const DomainT& up)
+        {
+            return 
+                static_interval
+                < interval_type
+                , is_discrete<typename interval_traits<interval_type>::domain_type>::value
+                , interval_bounds::static_closed
+                , interval_bound_type<interval_type>::value
+                >
+                ::construct(low, up); 
+        }
+
+        static inline interval_type construct(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up); }
+
+#else // ITL_USE_DYNAMIC_INTERVAL_BORDER_DEFAULTS
+        static inline interval_type right_open(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up, interval_bounds::right_open()); }
+
+        static inline interval_type left_open(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up, interval_bounds::left_open()); }
+
+        static inline interval_type open(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up, interval_bounds::open()); }
+
+        static inline interval_type closed(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up, interval_bounds::closed()); }
+
+        static inline interval_type construct(const DomainT& low, const DomainT& up)
+        { return itl::construct<interval_type>(low, up); }
+
+#endif 
+    };
+
+    template <class IntervalT, bool IsDiscrete, bound_type PretendedBounds, bound_type RepresentedBounds> 
+    struct static_interval;
+
+    template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds> 
+    struct static_interval<IntervalT, true, PretendedBounds, RepresentedBounds>
+    {// is_discrete<domain_type<IntervalT>>
+        typedef typename interval_traits<IntervalT>::domain_type domain_type;
+
+        static inline IntervalT construct(const domain_type& low, const domain_type& up)
+        {
+            return itl::construct<IntervalT>(
+                  shift_lower(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), low)
+                , shift_upper(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), up )
+                ); 
+        }
+    };
+
+    template <class IntervalT, bound_type PretendedBounds, bound_type RepresentedBounds> 
+    struct static_interval<IntervalT, false, PretendedBounds, RepresentedBounds>
+    {// !is_discrete<domain_type<IntervalT>>
+        typedef typename interval_traits<IntervalT>::domain_type domain_type;
+
+        static inline IntervalT construct(const domain_type& low, const domain_type& up)
+        {
+            BOOST_STATIC_ASSERT((is_discrete<domain_type>::value || PretendedBounds==RepresentedBounds));
+            // For domain_types that are not discrete, e.g. interval<float> 
+            // one of the following must hold: If you call
+            // interval<T>::right_open(x,y) then interval<T>::type must be static_right_open
+            // interval<T>::left_open(x,y)  then interval<T>::type must be static_left_open
+            // interval<T>::open(x,y)       then interval<T>::type must be static_open
+            // interval<T>::closed(x,y)     then interval<T>::type must be static_closed
+            // Conversion between 'PretendedBounds' and 'RepresentedBounds' is only possible
+            // for discrete domain_types.
+            return itl::construct<IntervalT>(low, up);
+        }
+    };
+
 }} // namespace boost itl
 
 #endif
Modified: sandbox/itl/boost/itl/type_traits/is_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/is_interval.hpp	(original)
+++ sandbox/itl/boost/itl/type_traits/is_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -18,7 +18,7 @@
 struct interval_bound_type
 {
     typedef interval_bound_type type;
-    BOOST_STATIC_CONSTANT(unsigned char, value = (interval_bounds::undefined)); 
+    BOOST_STATIC_CONSTANT(bound_type, value = (interval_bounds::undefined)); 
 };
 
 template <class Type> struct is_interval
@@ -46,7 +46,7 @@
 template <class Type> struct has_asymmetric_bounds
 { 
     typedef has_asymmetric_bounds<Type> type;
-    BOOST_STATIC_CONSTANT(unsigned char, bounds = (interval_bound_type<Type>::value)); 
+    BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type<Type>::value)); 
     BOOST_STATIC_CONSTANT(bool, 
         value = (   bounds == interval_bounds::static_left_open 
                  || bounds == interval_bounds::static_right_open)); 
@@ -55,7 +55,7 @@
 template <class Type> struct has_symmetric_bounds
 { 
     typedef has_symmetric_bounds<Type> type;
-    BOOST_STATIC_CONSTANT(unsigned char, bounds = (interval_bound_type<Type>::value)); 
+    BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type<Type>::value)); 
     BOOST_STATIC_CONSTANT(bool, 
         value = (   bounds == interval_bounds::static_closed 
                  || bounds == interval_bounds::static_open)); 
@@ -72,6 +72,17 @@
 };
 
 //------------------------------------------------------------------------------
+template <class Type> struct is_continuous_static
+{ 
+    typedef is_continuous_static type;
+    typedef typename interval_traits<Type>::domain_type domain_type;
+    BOOST_STATIC_CONSTANT(bool, 
+        value = (mpl::and_< has_static_bounds<Type>
+                          , is_continuous<domain_type>
+                          , has_asymmetric_bounds<Type> >::value) ); 
+};
+
+//------------------------------------------------------------------------------
 template <class Type> struct is_static_right_open
 { 
     typedef is_static_right_open<Type> type;
@@ -120,6 +131,25 @@
                           , is_discrete<domain_type> >::value) ); 
 };
 
+//------------------------------------------------------------------------------
+template <class Type> struct is_continuous_right_open
+{ 
+    typedef is_continuous_right_open<Type> type;
+    typedef typename interval_traits<Type>::domain_type domain_type;
+    BOOST_STATIC_CONSTANT(bool, 
+        value = (mpl::and_<is_static_right_open<Type>, is_continuous<domain_type> >::value)); 
+};
+
+template <class Type> struct is_continuous_left_open
+{ 
+    typedef is_continuous_left_open<Type> type;
+    typedef typename interval_traits<Type>::domain_type domain_type;
+    BOOST_STATIC_CONSTANT(bool, 
+        value = (mpl::and_<is_static_left_open<Type>, is_continuous<domain_type> >::value)); 
+};
+
+//------------------------------------------------------------------------------
+
 template <class Type> struct is_singelizable
 {
     typedef is_singelizable type;
Modified: sandbox/itl/boost/itl_xt/bits_gentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/bits_gentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/bits_gentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -20,7 +20,8 @@
 class bits_gentor: public RandomGentorAT<itl::bits<NaturalT> >
 {
 public:
-
+    //CL typedef interval<NaturalT>  range_type;
+    typedef typename interval<NaturalT>::type  range_type;
     typedef itl::bits<NaturalT> bits_type;
 
     void some(bits_type& value)
@@ -33,7 +34,7 @@
 
 private:
     NumberGentorT<NaturalT> _natural_gentor;
-    itl::interval<NaturalT> _value_range;
+    range_type              _value_range;
 };
 
 }} // namespace itl boost
Modified: sandbox/itl/boost/itl_xt/itvgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/itvgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/itvgentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -46,9 +46,12 @@
 class ItvGentorT: public RandomGentorAT<ItvTV>
 {
 public:
+    typedef itl::interval<ItvDomTV> range_type;
+    //typedef typename itl::_interval<ItvDomTV>::type range_type;
+
     virtual void some(ItvTV& x);
 
-    void setRange(const itl::interval<ItvDomTV>& range)
+    void setRange(const range_type& range)
     { m_valueRange = range; }
 
     void setValueRange(ItvDomTV low, ItvDomTV up)
@@ -60,8 +63,8 @@
 private:
     NumberGentorT<ItvDomTV> m_ItvDomTVGentor;
 
-    interval<ItvDomTV>    m_valueRange;
-    ItvDomTV              m_maxIntervalLength;
+    range_type    m_valueRange;
+    ItvDomTV      m_maxIntervalLength;
 
 private:
     template<class IntervalT, bool has_static_bounds>
Modified: sandbox/itl/boost/itl_xt/map_segment_gentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/map_segment_gentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/map_segment_gentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -26,6 +26,8 @@
     typedef DomainT   domain_type;
     typedef CodomainT codomain_type;
     typedef IntervalT interval_type;
+    typedef itl::interval<codomain_type> co_range_type;
+    //typedef typename itl::_interval<codomain_type>::type co_range_type;
     typedef std::pair<IntervalT, CodomainT> segment_type;
 
 public:
@@ -52,7 +54,7 @@
 private:
     ItvGentorT<domain_type,IntervalT> _interval_gentor;
     RandomGentorAT<codomain_type>*    _codomain_gentor;
-    itl::interval<codomain_type>      _covalue_range;
+    co_range_type                     _covalue_range;
 };
 
 
Modified: sandbox/itl/boost/itl_xt/mapgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/mapgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/mapgentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -23,6 +23,8 @@
     typedef typename MapTV::key_type   DomainTD;
     typedef typename MapTV::data_type  CodomainTD;
     typedef list<ValueTypeTD>          SampleTypeTD;
+    typedef itl::interval<int>         sample_range_type;
+    //typedef typename itl::_interval<int>::type sample_range_type;
 
     MapGentorT(): p_domainGentor(NULL), p_codomainGentor(NULL) {}
     ~MapGentorT() { delete p_domainGentor; delete p_codomainGentor; }
@@ -50,7 +52,7 @@
 private:
     RandomGentorAT<DomainTD>*    p_domainGentor;
     RandomGentorAT<CodomainTD>*  p_codomainGentor;
-    interval<int>                m_sampleSizeRange;
+    sample_range_type            m_sampleSizeRange;
     SampleTypeTD                 m_sample;
     int                          m_sampleSize;
 };
Modified: sandbox/itl/boost/itl_xt/numbergentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/numbergentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/numbergentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -16,6 +16,7 @@
 #include <vector>
 #include <boost/validate/type/nat.hpp>
 #include <boost/itl/type_traits/unit_element.hpp>
+#include <boost/itl/type_traits/interval_type_default.hpp>
 #include <boost/itl_xt/gentorit.hpp>
 
 using namespace boost::itl;
@@ -55,29 +56,34 @@
 class NumberGentorProfile : public RandomGentorProfile<NumT>
 {
 public:
+    typedef typename itl::_interval<NumT>::type range_type;
+    //CL typedef          itl:: interval<NumT>       range_type;
 private:
-    interval<NumT> _range;
+    range_type _range;
 };
 
 template <class NumTV>
 class NumberGentorT : public RandomGentorAT<NumTV>
 {
 public:
+    //typedef typename itl::_interval<NumTV>::type range_type;
+    typedef          itl:: interval<NumTV>       range_type;
+public:
     NumberGentorT(): 
-	  m_valueRange( NumTV(), unit_element<NumTV>::value(), itl::right_open_bounded ) {}
+      m_valueRange( NumTV(), unit_element<NumTV>::value(), itl::right_open_bounded ) {}
 
     NumTV operator() (NumTV upb) { return rnd_0_to_excl<NumTV>(upb); }
     NumTV operator() (NumTV lwb, NumTV upb)  { return rnd_within_exUpb<NumTV>(lwb,upb); }
-    NumTV operator() (interval<NumTV> rng) 
+    NumTV operator() (range_type rng) 
     { 
-        BOOST_ASSERT(rng.is(right_open_bounded) || rng.is(closed_bounded));
-		if(rng.is(itl::right_open_bounded))
+        // BOOST_ASSERT(rng.is(right_open_bounded) || rng.is(closed_bounded));
+        if(rng.is(itl::right_open_bounded))
             return rnd_within_exUpb<NumTV>(rng.lower(), rng.upper());
         else
             return rnd_within<NumTV>(rng.lower(), rng.upper());
     }
 
-    void setRange(interval<NumTV> rng) { m_valueRange = rng; }
+    void setRange(range_type rng) { m_valueRange = rng; }
     void setRange(NumTV lwb, NumTV upb) { m_valueRange = interval<NumTV>::right_open(lwb,upb); } 
 
     void calibrate(const RandomGentorProfile<NumTV>& profile)
@@ -90,7 +96,7 @@
     std::string as_string()const { return "NumberGentorT";}
 
 private:
-    interval<NumTV> m_valueRange;
+    range_type m_valueRange;
 };
 
 // ----------------------------------------------------------------------------
Modified: sandbox/itl/boost/itl_xt/seqgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/seqgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/seqgentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -45,6 +45,8 @@
     typedef typename SeqTV::value_type  ValueTypeTD;
     typedef typename SeqTV::value_type  DomainTD;
     typedef list<ValueTypeTD>           SampleTypeTD;
+    typedef itl::interval<int>          sample_range_type;
+    //typedef typename itl::_interval<int>::type sample_range_type;
 
     SeqGentorT(): p_domainGentor(NULL), m_unique(false){}
     ~SeqGentorT(){ delete p_domainGentor; }
@@ -68,7 +70,7 @@
 
 private:
     RandomGentorAT<DomainTD>* p_domainGentor;
-    interval<int>             m_sampleSizeRange;
+    sample_range_type         m_sampleSizeRange;
     SampleTypeTD              m_sample;
     int                       m_sampleSize;
     bool                      m_unique;
Modified: sandbox/itl/boost/itl_xt/setgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/setgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/setgentor.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -48,6 +48,8 @@
     typedef list<ValueTypeTD>    SampleTypeTD;
     typedef RandomGentorAT<DomainTD>  DomainGentorT;
     typedef DomainGentorT*        DomainGentorPT;
+    typedef itl::interval<int>          sample_range_type;
+    //typedef typename itl::_interval<int>::type sample_range_type;
 
     SetGentorT(): p_domainGentor(NULL) {}
     ~SetGentorT() { delete p_domainGentor; }
@@ -71,7 +73,7 @@
 
 private:
     RandomGentorAT<DomainTD>*  p_domainGentor;
-    interval<int>              m_sampleSizeRange;
+    sample_range_type          m_sampleSizeRange;
     SampleTypeTD               m_sample;
     int                        m_sampleSize;
 };
Modified: sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp	(original)
+++ sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -87,21 +87,21 @@
 
     party.add( // add and element
       make_pair( 
-        right_open_interval<ptime>(
+        _interval<ptime>::right_open(
           time_from_string("2008-05-20 19:30"), 
           time_from_string("2008-05-20 23:00")), 
         mary_harry));
 
     party += // element addition can also be done via operator +=
       make_pair( 
-        right_open_interval<ptime>(
+        _interval<ptime>::right_open(
           time_from_string("2008-05-20 20:10"), 
           time_from_string("2008-05-21 00:00")), 
         diana_susan);
 
     party +=
       make_pair( 
-        right_open_interval<ptime>(
+        _interval<ptime>::right_open(
           time_from_string("2008-05-20 22:15"), 
           time_from_string("2008-05-21 00:30")), 
         peter);
@@ -111,7 +111,7 @@
     cout << "----- History of party guests -------------------------\n";
     while(it != party.end())
     {
-        right_open_interval<ptime> when = it->first;
+        _interval<ptime>::type when = it->first;
         // Who is at the party within the time interval 'when' ?
         GuestSetT who = (*it++).second;
         cout << when << ": " << who << endl;
Modified: sandbox/itl/libs/itl/example/custom_interval_/custom_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/custom_interval_/custom_interval.cpp	(original)
+++ sandbox/itl/libs/itl/example/custom_interval_/custom_interval.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -58,10 +58,10 @@
 
 template<>
 struct interval_bound_type<MyInterval>     //4.  Finally we define the interval borders.
-{                                          //    Choose between static_open           (lo..up)
-    typedef interval_bound_type type;      //                   static_left_open       (lo..up]
-    BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_right_open);//[lo..up)
-};                                         //               and static_closed         [lo..up] 
+{                                          //    Choose between static_open         (lo..up)
+    typedef interval_bound_type type;      //                   static_left_open    (lo..up]
+    BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open);//[lo..up)
+};                                         //               and static_closed       [lo..up] 
 
 
 void custom_interval()
Modified: sandbox/itl/libs/itl/example/interval_/vc9_interval.vcproj
==============================================================================
--- sandbox/itl/libs/itl/example/interval_/vc9_interval.vcproj	(original)
+++ sandbox/itl/libs/itl/example/interval_/vc9_interval.vcproj	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -200,10 +200,6 @@
                         UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
                 </Filter>
-		<File
-			RelativePath=".\ClassDiagram1.cd"
-			>
-		</File>
         </Files>
         <Globals>
         </Globals>
Modified: sandbox/itl/libs/itl/example/party_/party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/party_/party.cpp	(original)
+++ sandbox/itl/libs/itl/example/party_/party.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -76,9 +76,13 @@
 
     interval_map<Time, GuestSetT> party;
 
-    party += make_pair( discrete_interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
-    party += make_pair( discrete_interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
-    party += make_pair( discrete_interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
+    //party += make_pair( discrete_interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
+    //party += make_pair( discrete_interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
+    //party += make_pair( discrete_interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
+
+    party += make_pair( _interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry);
+    party += make_pair( _interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan);
+    party += make_pair( _interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter);
 
     interval_map<Time, GuestSetT>::iterator it = party.begin();
     while(it != party.end())
Modified: sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp	(original)
+++ sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -10,9 +10,20 @@
 #include <boost/mpl/list.hpp>
 #include "../unit_test_unwarned.hpp"
 
+//#define ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
 // interval instance types
 #include "../test_type_lists.hpp"
 #include "../test_value_maker.hpp"
+#include "../test_interval_laws.hpp"
+
+#include <boost/itl/right_open_interval.hpp>
+#include <boost/itl/left_open_interval.hpp>
+#include <boost/itl/closed_interval.hpp>
+#include <boost/itl/open_interval.hpp>
+
+#include <boost/itl/discrete_interval.hpp>
+#include <boost/itl/continuous_interval.hpp>
 
 using namespace std;
 using namespace boost;
@@ -26,14 +37,6 @@
 #include "../test_icl_continuous_interval.hpp"
 #include "../test_icl_static_interval.hpp"
 
-#include <boost/itl/right_open_interval.hpp>
-#include <boost/itl/left_open_interval.hpp>
-#include <boost/itl/closed_interval.hpp>
-#include <boost/itl/open_interval.hpp>
-
-#include <boost/itl/discrete_interval.hpp>
-#include <boost/itl/continuous_interval.hpp>
-
 //==============================================================================
 //= Traits
 //==============================================================================
@@ -109,18 +112,14 @@
 (fastest_itl_distant_intervals_4_numeric_continuous_types)
 {            distant_intervals_4_numeric_continuous_types<numeric_continuous_type_1, std::less>(); }
 
-/*
-BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_ctor_4_bicremental_types)
-{            interval_ctor_4_bicremental_types<bicremental_type_2>(); }
-
+//------------------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_ctor_4_integral_types)
-{            interval_ctor_4_integral_types<integral_type_1>(); }
+(fastest_itl_dynamic_interval_bounds_4_bicremental_types)
+{            dynamic_interval_bounds_4_bicremental_types<bicremental_type_2>(); }
 
-BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_ctor_specific)
-{            interval_ctor_specific(); }
+//==============================================================================
+//==============================================================================
+//JODO old tests are not adapted to static_intervals
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_equal_4_integral_types)
@@ -131,10 +130,6 @@
 {            interval_less_4_integral_types<integral_type_3>(); }
 
 BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_equal_4_bicremental_continuous_types)
-{            interval_equal_4_bicremental_continuous_types<bicremental_continuous_type_1>(); }
-
-BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_touches_4_bicremental_types)
 {            interval_touches_4_bicremental_types<bicremental_type_1>(); }
 
@@ -142,21 +137,28 @@
 (fastest_itl_interval_touches_4_integral_types)
 {            interval_touches_4_integral_types<integral_type_4>(); }
 
+#ifndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
 BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_inplace_intersect_4_bicremental_types)
-{            interval_inplace_intersect_4_bicremental_types<bicremental_type_3>(); }
+(fastest_itl_interval_ctor_specific)
+{            interval_ctor_specific(); } //JODO static
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_interval_equal_4_bicremental_continuous_types)
+{            interval_equal_4_bicremental_continuous_types<bicremental_continuous_type_1>(); }  //JODO static
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_infix_intersect_4_bicremental_types)
 {            interval_infix_intersect_4_bicremental_types<bicremental_type_4>(); }
 
+#else
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_interval_infix_intersect_4_bicremental_types)
+{            interval_infix_intersect_4_bicremental_types<discrete_type_2>(); }
+
 BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_subtract_4_bicremental_types)
 {            interval_subtract_4_bicremental_types<bicremental_type_5>(); }
-*/
 
-/*JODO
-BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_inner_complement_4_bicremental_types)
-{            interval_inner_complement_4_bicremental_types<bicremental_type_6>(); }
-*/
+#endif // ndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
Modified: sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -21,6 +21,10 @@
 #include <boost/detail/is_incrementable.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
 
+#define ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#define BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT closed_interval
+#define BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS 3
+
 #include <boost/itl/interval_set.hpp>
 #include <boost/itl/separate_interval_set.hpp>
 #include <boost/itl/split_interval_set.hpp>
@@ -259,7 +263,7 @@
 
     BOOST_CHECK_EQUAL((is_fragment_of<IntervalSetT::element_type, IntervalSetT>::value), true);
     BOOST_CHECK_EQUAL((is_fragment_of<IntervalSetT::segment_type, IntervalSetT>::value), true);
-    BOOST_CHECK_EQUAL((is_fragment_of<discrete_interval<T>, IntervalSetT>::value), true);
+    //BOOST_CHECK_EQUAL((is_fragment_of<discrete_interval<T>, IntervalSetT>::value), true);
     BOOST_CHECK_EQUAL((is_fragment_of<double, IntervalSetT>::value), false);
 
 
@@ -275,26 +279,67 @@
     BOOST_CHECK( (is_same<key_type_of<std::set<int> >::type, int>::value) );
     BOOST_CHECK( (is_same<value_type_of<std::set<int> >::type, int>::value) );
 
-    BOOST_CHECK_EQUAL( is_std_set<std::set<int> >::value,      true );
-    BOOST_CHECK_EQUAL( is_std_set<interval_set<int> >::value,  false);
-    BOOST_CHECK_EQUAL((is_std_set<std::map<int,int> >::value), false);
-    BOOST_CHECK_EQUAL( is_element_set<std::set<int> >::value,  true );
+    BOOST_CHECK_EQUAL( is_std_set<std::set<int> >::value,      true  );
+    BOOST_CHECK_EQUAL( is_std_set<interval_set<int> >::value,  false );
+    BOOST_CHECK_EQUAL((is_std_set<std::map<int,int> >::value), false );
+    BOOST_CHECK_EQUAL( is_element_set<std::set<int> >::value,  true  );
+    BOOST_CHECK_EQUAL( is_interval_set<std::set<int> >::value, false );
     BOOST_CHECK_EQUAL( is_interval_set<std::set<int> >::value, false );
 
-    std::set<int> set_a, set_b, set_c;
-    itl::add(set_a, 1);
-    itl::add(set_a, 5);
-    set_b = set_a;
-    set_b += 7;
-    set_c += 3;
-    set_b += set_c;
-    cout << set_a << endl;
-    cout << set_b << endl;
-    add_intersection(set_c, set_a, set_b);
-    cout << set_c << endl;
-    itl::within(set_a, set_b);
-
-    itl::map<int,int> a, b;
-    within(a & b, a);
+#if defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && !defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+    BOOST_CHECK( (is_same<_interval<int   >::type, right_open_interval<int   > >::value) );
+    BOOST_CHECK( (is_same<_interval<double>::type, right_open_interval<double> >::value) );
+
+    BOOST_CHECK_EQUAL( _interval<int>::open(0,2),       itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1),  itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::closed(1,1),     itl::construct<right_open_interval<int> >(1,2) );
+
+    BOOST_CHECK_EQUAL( _interval<float>::right_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
+    //The next yields compiletime error: STATIC_ASSERTION_FAILURE
+    //BOOST_CHECK_EQUAL( _interval<float>::left_open(1.0,2.0), itl::construct<right_open_interval<float> >(1.0,2.0) );
+#endif
+
+#if defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+#   if defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 0)
+    cout << "discrete_interval == open_interval\n";
+    BOOST_CHECK( (is_same<_interval<int>::type, open_interval<int> >::value) );
+    BOOST_CHECK_EQUAL( _interval<int>::open(0,2),       itl::construct<open_interval<int> >(0,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1),  itl::construct<open_interval<int> >(0,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<open_interval<int> >(0,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::closed(1,1),     itl::construct<open_interval<int> >(0,2) );
+
+#   elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 1)
+    cout << "discrete_interval == left_open_interval\n";
+    BOOST_CHECK( (is_same<_interval<int>::type, left_open_interval<int> >::value) );
+    BOOST_CHECK_EQUAL( _interval<int>::open(0,2),       itl::construct<left_open_interval<int> >(0,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1),  itl::construct<left_open_interval<int> >(0,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<left_open_interval<int> >(0,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::closed(1,1),     itl::construct<left_open_interval<int> >(0,1) );
+
+#   elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 2)
+    cout << "discrete_interval == right_open_interval\n";
+    BOOST_CHECK( (is_same<_interval<int>::type, right_open_interval<int> >::value) );
+    BOOST_CHECK_EQUAL( _interval<int>::open(0,2),       itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1),  itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<right_open_interval<int> >(1,2) );
+    BOOST_CHECK_EQUAL( _interval<int>::closed(1,1),     itl::construct<right_open_interval<int> >(1,2) );
+
+#   elif defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 3)
+    cout << "discrete_interval == closed_interval\n";
+    BOOST_CHECK( (is_same<_interval<int>::type, closed_interval<int> >::value) );
+    BOOST_CHECK_EQUAL( _interval<int>::open(0,2),       itl::construct<closed_interval<int> >(1,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::left_open(0,1),  itl::construct<closed_interval<int> >(1,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::right_open(1,2), itl::construct<closed_interval<int> >(1,1) );
+    BOOST_CHECK_EQUAL( _interval<int>::closed(1,1),     itl::construct<closed_interval<int> >(1,1) );
+
+#   else
+    cout << "#else part, INTERVAL_BORDERS not in {0,1,2,3}\n";
+#endif //defined(ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+
+#else
+    BOOST_CHECK( (is_same<_interval<int   >::type,   discrete_interval<int   > >::value) );
+    BOOST_CHECK( (is_same<_interval<double>::type, continuous_interval<double> >::value) );
+#endif
 }
 
Modified: sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -26,11 +26,11 @@
 {
     typedef  right_open_interval<T,Compare> L__D; // L__D for [..)
     typedef   left_open_interval<T,Compare> C__I; // C__I for (..]
-    typedef continuous_interval<T,Compare> IntervalT;
+    typedef  typename  _interval<T,Compare>::type IntervalT;
 
     BOOST_CHECK( is_interval<L__D>::value ); 
     BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value ); 
-    BOOST_CHECK( is_continuous<typename interval_traits<L__D>::domain_type>::value    ); 
+    BOOST_CHECK( is_continuous<typename interval_traits<L__D>::domain_type>::value  ); 
     BOOST_CHECK( (is_same<typename interval_traits<L__D>::domain_type, T>::value)   ); 
 
     typedef typename difference_type_of<T>::type DiffT;
@@ -49,6 +49,7 @@
     test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,0,6));
 
     //--------------------------------------------------------------------------
+#ifndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
     test_inner_complement<T,Compare,IntervalT>(I_D(0,4), I_D(8,9));
     test_inner_complement<T,Compare,IntervalT>(I_D(7,8), I_D(2,3));
     test_inner_complement<T,Compare,IntervalT>(I_D(2,4), I_D(4,6));
@@ -73,6 +74,7 @@
     test_inner_complement<T,Compare,IntervalT>(C_D(3,0), C_D(4,0));
     test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(4,6));
     test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(0,6));
+#endif //ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
 }
 
 
Modified: sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_icl_discrete_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -36,7 +36,7 @@
     typedef  left_open_interval<T,Compare> C__I; // C__I for (..]
     typedef    closed_interval<T,Compare> L__I; // L__I for [..]
     typedef      open_interval<T,Compare> C__D; // C__D for (..)
-    typedef  discrete_interval<T,Compare> IntervalT;
+    typedef typename _interval<T,Compare>::type IntervalT;
 
     BOOST_CHECK( is_interval<L__D>::value ); 
     BOOST_CHECK( has_difference<typename interval_traits<L__D>::domain_type>::value ); 
Modified: sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_icl_dynamic_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -23,6 +23,43 @@
     BOOST_CHECK_EQUAL(IntervalT(), IntervalT(itl::identity_element<T>::value(), itl::identity_element<T>::value(), interval_bounds::right_open()));
 }
 
+template <class T> 
+void dynamic_interval_bounds_4_bicremental_types()
+{
+    typedef typename itl::_interval<T>::type IntervalT;
+
+    BOOST_CHECK_EQUAL( T(), pred(succ(T())));
+    BOOST_CHECK_EQUAL( itl::identity_element<T>::value(), pred(succ(itl::identity_element<T>::value())) );
+    BOOST_CHECK_EQUAL( itl::unit_element<T>::value(),     succ(itl::identity_element<T>::value())        );
+    BOOST_CHECK_EQUAL( length(IntervalT()), itl::identity_element<typename difference_type_of<T>::type>::value() );
+
+    //LAW: I x: borders(x)==closed => contains(x, lower(x)) && contains(x, upper(x))
+    check_border_containedness(I_I(0,0));
+    check_border_containedness(I_I(2,5));
+
+    check_border_containedness(I_D(0,1));
+    check_border_containedness(I_D(2,5));
+
+    check_border_containedness(C_I(0,1));
+    check_border_containedness(C_I(2,5));
+
+    check_border_containedness(C_I(0,2));
+    check_border_containedness(C_I(2,5));
+
+}
+
+template <class T> 
+void discrete_dynamic_interval_bounds_4_bicremental_types()
+{
+    typedef typename itl::_interval<T>::type IntervalT;
+
+    BOOST_CHECK( itl::bounds(I_I(2,4)) == interval_bounds::closed()     );
+    BOOST_CHECK( itl::bounds(I_D(2,5)) == interval_bounds::right_open() );
+    BOOST_CHECK( itl::bounds(C_I(1,4)) == interval_bounds::left_open()  );
+    BOOST_CHECK( itl::bounds(C_D(1,5)) == interval_bounds::open()       );
+
+}
+
 
 
 #endif // BOOST_ITL_TEST_ICL_DYNAMIC_INTERVAL_HPP_JOFA_100930
Modified: sandbox/itl/libs/itl/test/test_itl_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_itl_interval.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -33,403 +33,6 @@
 }
 
 /*JODO
-template <class T> 
-void interval_ctor_4_bicremental_types()
-{
-    BOOST_CHECK_EQUAL( T(), pred(succ(T())));
-    BOOST_CHECK_EQUAL( itl::identity_element<T>::value(), pred(succ(itl::identity_element<T>::value()))       );
-    BOOST_CHECK_EQUAL( itl::unit_element<T>::value(),    succ(itl::identity_element<T>::value())             );
-    BOOST_CHECK_EQUAL( interval<T>().length(),   itl::identity_element<typename difference_type_of<T>::type>::value() );
-
-    T v4 = make<T>(4);
-    itl::interval<T> I4_4I(v4);
-    BOOST_CHECK_EQUAL( I4_4I.is(closed_bounded),         true  );
-    BOOST_CHECK_EQUAL( I4_4I.is(left_open),       false );
-    BOOST_CHECK_EQUAL( I4_4I.is(right_open),      false );
-    BOOST_CHECK_EQUAL( I4_4I.is(open_bounded),           false );
-    BOOST_CHECK_EQUAL( I4_4I.is_left(closed_bounded),  true  );
-    BOOST_CHECK_EQUAL( I4_4I.is_right(closed_bounded), true  );
-    BOOST_CHECK_EQUAL( I4_4I.is_left(open_bounded),    false );
-    BOOST_CHECK_EQUAL( I4_4I.is_right(open_bounded),   false );
-
-    BOOST_CHECK_EQUAL( I4_4I.lower(),             v4    );
-    BOOST_CHECK_EQUAL( I4_4I.upper(),             v4    );
-
-    BOOST_CHECK_EQUAL( I4_4I.contains(v4),        true  );
-    BOOST_CHECK_EQUAL( I4_4I.contains(I4_4I),     true  );
-    BOOST_CHECK_EQUAL( I4_4I.contained_in(I4_4I), true  );
-    BOOST_CHECK_EQUAL( I4_4I,                     I4_4I );
-
-    BOOST_CHECK_EQUAL( I4_4I.cardinality(),       unit_element<typename interval<T>::size_type>::value()          );
-    BOOST_CHECK_EQUAL( I4_4I.size(),              unit_element<typename interval<T>::size_type>::value()          );
-    //BOOST_CHECK_EQUAL( I4_4I.length(),          identity_element<typename interval<T>::difference_type>::value() );
-
-    itl::interval<T> j_4_4(I4_4I);
-    BOOST_CHECK_EQUAL( I4_4I, j_4_4 );
-    interval<T> k_4_4;
-    k_4_4 = j_4_4;
-    BOOST_CHECK_EQUAL( I4_4I, k_4_4 );
-
-    T v2 = make<T>(2);
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4),    interval<T>(v2, v4) );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4),    interval<T>(v2, v4, closed_bounded) );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4), interval<T>(v2, v4, right_open) );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4),  interval<T>(v2, v4, left_open) );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4),      interval<T>(v2, v4, open_bounded) );
-
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).lower(),               v2 );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).upper(),               v4 );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).boundtype(),           closed_bounded );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is(closed_bounded),    true );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_left(closed_bounded),    true );
-    BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_right(closed_bounded),   true );
-
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).lower(),            v2 );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).upper(),            v4 );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).boundtype(),        right_open );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).is(right_open),     true );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).is_left(closed_bounded), true );
-    BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).is_right(open_bounded),  true );
-
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).lower(),             v2 );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).upper(),             v4 );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).boundtype(),         left_open );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).is(left_open),       true );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).is_left(open_bounded),    true );
-    BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).is_right(closed_bounded), true );
-
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).lower(),                 v2 );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).upper(),                 v4 );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).boundtype(),            open_bounded );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is(open_bounded),               true );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_left(open_bounded),        true );
-    BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_right(open_bounded),       true );    
-}
-
-template <class T> 
-void interval_ctor_4_integral_types()
-{
-    BOOST_CHECK_EQUAL(interval<T>().first(),  itl::unit_element<T>::value());
-    BOOST_CHECK_EQUAL(interval<T>().last(),   itl::identity_element<T>::value());
-    BOOST_CHECK_EQUAL(interval<T>().length(), itl::identity_element<typename interval<T>::difference_type>::value());
-
-    BOOST_CHECK_EQUAL(interval<T>(0,0).length(), itl::unit_element<typename interval<T>::difference_type>::value());
-}
-
-void interval_ctor_specific()//JODO 
-{
-    BOOST_CHECK_EQUAL(interval<double>().length(), 0.0);
-    BOOST_CHECK_EQUAL(interval<double>(5.0,5.0).cardinality(), 1);
-    BOOST_CHECK_EQUAL(interval<std::string>("test","test").cardinality(), 1);
-    BOOST_CHECK_EQUAL(interval<std::string>("best","test").cardinality(), interval<double>(0.0,0.1).cardinality());
-}
-
-template <class T> 
-void interval_equal_4_integral_types()
-{
-    T v2 = make<T>(2);
-    T v3 = make<T>(3);
-    T v7 = make<T>(7);
-    T v8 = make<T>(8);
-    BOOST_CHECK_EQUAL(interval<T>(), interval<T>(v7,v3));
-
-    //I: (I)nside  = closed bound
-    //C: left open bound
-    //D: right open bound
-    interval<T>  I3_7I  = interval<T>::closed(v3,v7);
-    interval<T>  I3__8D = interval<T>::right_open(v3,v8);
-    interval<T> C2__7I  = interval<T>::left_open(v2,v7);
-    interval<T> C2___8D = interval<T>::open(v2,v8);
-
-    BOOST_CHECK_EQUAL(  I3_7I ,  I3_7I  );    
-    BOOST_CHECK_EQUAL(  I3_7I ,  I3__8D );    
-    BOOST_CHECK_EQUAL(  I3_7I , C2__7I  );    
-    BOOST_CHECK_EQUAL(  I3_7I , C2___8D );    
-
-    BOOST_CHECK_EQUAL(  I3__8D,  I3__8D );    
-    BOOST_CHECK_EQUAL(  I3__8D, C2__7I  );    
-    BOOST_CHECK_EQUAL(  I3__8D, C2___8D );    
-
-    BOOST_CHECK_EQUAL( C2__7I , C2__7I  );    
-    BOOST_CHECK_EQUAL( C2__7I , C2___8D );    
-
-    BOOST_CHECK_EQUAL( C2___8D, C2___8D );    
-}
-
-
-template <class T> 
-void interval_less_4_integral_types()
-{
-    T v2 = make<T>(2);
-    T v3 = make<T>(3);
-    T v4 = make<T>(4);
-    T v7 = make<T>(7);
-    T v8 = make<T>(8);
-    BOOST_CHECK_EQUAL(interval<T>() < interval<T>(v7,v3), false);
-    BOOST_CHECK_EQUAL(interval<T>::open(v2,v3) < interval<T>::right_open(v7,v7), false);
-    BOOST_CHECK_EQUAL(interval<T>::left_open(v3,v3) < interval<T>::closed(v7,v3), false);
-
-    BOOST_CHECK_EQUAL(interval<T>() < interval<T>(v3,v3), true);
-    BOOST_CHECK_EQUAL(interval<T>::open(v2,v3) < interval<T>::right_open(v7,v8), true);
-
-    //I: (I)nside  = closed bound
-    //C: left open bound
-    //D: right open bound
-    interval<T>  I3_7I  = interval<T>::closed(v3,v7);
-    interval<T>  I4_7I  = interval<T>::closed(v4,v7);
-
-    interval<T>  I3__8D = interval<T>::right_open(v3,v8);
-    interval<T> C2__7I  = interval<T>::left_open(v2,v7);
-    interval<T> C2___8D = interval<T>::open(v2,v8);
-
-    BOOST_CHECK_EQUAL(  I3_7I <  I3_7I  , false);    
-    BOOST_CHECK_EQUAL(  I3_7I <  I3__8D , false);    
-    BOOST_CHECK_EQUAL(  I3_7I < C2__7I  , false);    
-    BOOST_CHECK_EQUAL(  I3_7I < C2___8D , false);    
-
-    BOOST_CHECK_EQUAL(  I3_7I <  I4_7I  , true);    
-
-
-    BOOST_CHECK_EQUAL(  I3__8D<  I3__8D , false);    
-    BOOST_CHECK_EQUAL(  I3__8D< C2__7I  , false);    
-    BOOST_CHECK_EQUAL(  I3__8D< C2___8D , false);    
-
-    BOOST_CHECK_EQUAL( C2__7I < C2__7I  , false);    
-    BOOST_CHECK_EQUAL( C2__7I < C2___8D , false);    
-
-    BOOST_CHECK_EQUAL( C2___8D< C2___8D , false);    
-}
-
-
-template <class T> 
-void interval_equal_4_bicremental_continuous_types()
-{
-    T v3 = make<T>(3);
-    T v7 = make<T>(7);
-    BOOST_CHECK_EQUAL(interval<T>(), interval<T>(v7,v3));
-
-    //I: (I)nside  = closed bound
-    //O: (O)utside = open bound
-    interval<T> I3_7I = interval<T>::closed(v3,v7);
-    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-    interval<T> C3_7I = interval<T>::left_open(v3,v7);
-    interval<T> C3_7D = interval<T>::open(v3,v7);
-
-    BOOST_CHECK_EQUAL( I3_7I ,  I3_7I  );    
-    BOOST_CHECK_EQUAL( I3_7I == I3_7D, false  );    
-    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false  );    
-    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );    
-    BOOST_CHECK_EQUAL( I3_7I != I3_7D, true  );    
-    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true  );    
-    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );    
-
-    BOOST_CHECK_EQUAL( I3_7D ,  I3_7D  );    
-    BOOST_CHECK_EQUAL( I3_7D == C3_7I, false  );    
-    BOOST_CHECK_EQUAL( I3_7D == C3_7D, false );    
-    BOOST_CHECK_EQUAL( I3_7D != C3_7I, true  );    
-    BOOST_CHECK_EQUAL( I3_7D != C3_7D, true );    
-
-    BOOST_CHECK_EQUAL( C3_7I ,  C3_7I  );    
-    BOOST_CHECK_EQUAL( C3_7I == C3_7D, false );    
-    BOOST_CHECK_EQUAL( C3_7I != C3_7D, true );    
-
-    BOOST_CHECK_EQUAL( C3_7D,   C3_7D  );    
-} 
-
-template <class T> 
-void interval_touches_4_bicremental_types()
-{
-    T v3 = make<T>(3);
-    T v7 = make<T>(7);
-    T v9 = make<T>(9);
-
-    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-    interval<T> I7_9I = interval<T>::closed(v7,v9);
-    BOOST_CHECK_EQUAL( I3_7D.touches(I7_9I), true );    
-
-    interval<T> I3_7I = interval<T>::closed(v3,v7);
-    interval<T> C7_9I = interval<T>::left_open(v7,v9);
-    BOOST_CHECK_EQUAL( I3_7I.touches(C7_9I), true );
-
-    BOOST_CHECK_EQUAL( I3_7D.touches(C7_9I), false );    
-    BOOST_CHECK_EQUAL( I3_7I.touches(I7_9I), false );    
-}
-
-template <class T> 
-void interval_touches_4_integral_types()
-{
-    T v3 = make<T>(3);
-    T v6 = make<T>(6);
-    T v7 = make<T>(7);
-    T v9 = make<T>(9);
-
-    interval<T> I3_6I = interval<T>::closed(v3,v6);
-    interval<T> I7_9I = interval<T>::closed(v7,v9);
-    BOOST_CHECK_EQUAL( I3_6I.touches(I7_9I), true );    
-
-    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-    interval<T> C6_9I = interval<T>::left_open(v6,v9);
-    BOOST_CHECK_EQUAL( I3_7D.touches(C6_9I), true );
-}
-
-
-template <class T> 
-void interval_inplace_intersect_4_bicremental_types()
-{
-    T v0 = make<T>(0);
-    T v3 = make<T>(3);
-    T v4 = make<T>(4);
-    T v5 = make<T>(5);
-    T v6 = make<T>(6);
-    T v7 = make<T>(7);
-    T v9 = make<T>(9);
-
-    interval<T> section;
-    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-
-    interval<T> I0_3D = interval<T>::right_open(v0,v3);
-    section = I3_7D; section &= I0_3D;
-    BOOST_CHECK_EQUAL( I0_3D.is_disjoint(I3_7D), true );
-    BOOST_CHECK_EQUAL( !I0_3D.intersects(I3_7D), true );
-    BOOST_CHECK_EQUAL( is_disjoint(I0_3D,I3_7D), true );
-    BOOST_CHECK_EQUAL( !intersects(I0_3D,I3_7D), true );
-    BOOST_CHECK_EQUAL( section.empty(), true );
-    BOOST_CHECK_EQUAL( section, interval<T>() );
-
-    interval<T> I0_5D = interval<T>::right_open(v0,v5);
-    section = I3_7D; section &= I0_5D;
-    BOOST_CHECK_EQUAL( section, interval<T>::right_open(v3, v5) );
-
-    interval<T> I0_9D = interval<T>::right_open(v0,v9);
-    section = I3_7D; section &= I0_9D;
-    BOOST_CHECK_EQUAL( section, I3_7D );
-
-    interval<T> I4_5I = interval<T>::closed(v4,v5);
-    section = I3_7D; section &= I4_5I;
-    BOOST_CHECK_EQUAL( section, I4_5I );
-
-    interval<T> C4_6D = interval<T>::open(v4,v6);
-    section = I3_7D; section &= C4_6D;
-    BOOST_CHECK_EQUAL( section, C4_6D );
-
-    interval<T> C4_9I = interval<T>::left_open(v4,v9);
-    section = I3_7D; section &= C4_9I;
-    BOOST_CHECK_EQUAL( section, interval<T>::open(v4,v7) );
-
-    interval<T> I7_9I = interval<T>::closed(v7,v9);
-    section = I3_7D; section &= I7_9I;
-    BOOST_CHECK_EQUAL( I3_7D.exclusive_less(I7_9I), true );
-    BOOST_CHECK_EQUAL( I3_7D.is_disjoint(I7_9I), true );
-    BOOST_CHECK_EQUAL( !I3_7D.intersects(I7_9I), true );
-    BOOST_CHECK_EQUAL( is_disjoint(I3_7D,I7_9I), true );
-    BOOST_CHECK_EQUAL( !intersects(I3_7D,I7_9I), true );
-    BOOST_CHECK_EQUAL( section.empty(), true );
-}
-
-template <class T> 
-void interval_infix_intersect_4_bicremental_types()
-{
-    T v0 = make<T>(0);
-    T v3 = make<T>(3);
-    T v4 = make<T>(4);
-    T v5 = make<T>(5);
-    T v6 = make<T>(6);
-    T v7 = make<T>(7);
-    T v9 = make<T>(9);
-
-    interval<T> section;
-    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-
-    interval<T> I0_3D = interval<T>::right_open(v0,v3);
-    section = I3_7D & I0_3D;
-    BOOST_CHECK_EQUAL( I0_3D.is_disjoint(I3_7D), true );
-    BOOST_CHECK_EQUAL( section.empty(), true );
-    BOOST_CHECK_EQUAL( section, interval<T>() );
-
-    interval<T> I0_5D = interval<T>::right_open(v0,v5);
-    section = I3_7D & I0_5D;
-    BOOST_CHECK_EQUAL( section, interval<T>::right_open(v3, v5) );
-
-    interval<T> I0_9D = interval<T>::right_open(v0,v9);
-    section = I3_7D & I0_9D;
-    BOOST_CHECK_EQUAL( section, I3_7D );
-
-    interval<T> I4_5I = interval<T>::closed(v4,v5);
-    section = I3_7D & I4_5I;
-    BOOST_CHECK_EQUAL( section, I4_5I );
-
-    interval<T> C4_6D = interval<T>::open(v4,v6);
-    section = I3_7D & C4_6D;
-    BOOST_CHECK_EQUAL( section, C4_6D );
-
-    interval<T> C4_9I = interval<T>::left_open(v4,v9);
-    section = I3_7D & C4_9I;
-    BOOST_CHECK_EQUAL( section, interval<T>::open(v4,v7) );
-
-    interval<T> I7_9I = interval<T>::closed(v7,v9);
-    section = I3_7D & I7_9I;
-    BOOST_CHECK_EQUAL( I3_7D.exclusive_less(I7_9I), true );
-    BOOST_CHECK_EQUAL( I3_7D.is_disjoint(I7_9I), true );
-    BOOST_CHECK_EQUAL( section.empty(), true );
-}
-
-template <class T> 
-void interval_subtract_4_bicremental_types()
-{
-    T v0 = make<T>(0);
-    T v2 = make<T>(2);
-    T v3 = make<T>(3);
-    T v4 = make<T>(4);
-    T v6 = make<T>(6);
-    T v7 = make<T>(7);
-
-    interval<T> diff_1, diff_2;
-    interval<T> I0_3D = interval<T>::right_open(v0,v3);
-    interval<T> I2_6D = interval<T>::right_open(v2,v6);
-    interval<T> I4_7D = interval<T>::right_open(v4,v7);
-    interval<T> I6_7D = interval<T>::right_open(v6,v7);
-    interval<T> I2_4D = interval<T>::right_open(v2,v4);
-
-    diff_1 = right_subtract(I2_6D, I4_7D);
-    BOOST_CHECK_EQUAL( diff_1, I2_4D );
-
-    diff_2 = I2_6D;
-    diff_2.right_subtract(I4_7D);
-    BOOST_CHECK_EQUAL( diff_2, I2_4D );
-
-    diff_1.clear();
-    diff_1 = right_subtract(I0_3D, I4_7D);
-    BOOST_CHECK_EQUAL( diff_1, I0_3D );
-    
-    // ---------------------------------
-    diff_1 = left_subtract(I4_7D, I2_6D);
-    BOOST_CHECK_EQUAL( diff_1, I6_7D );
-
-    diff_2 = I4_7D;
-    diff_2.left_subtract(I2_6D);
-    BOOST_CHECK_EQUAL( diff_2, I6_7D );
-
-    diff_1.clear();
-    diff_1 = left_subtract(I4_7D, I0_3D);
-    BOOST_CHECK_EQUAL( diff_1, I4_7D );
-
-    diff_2 = I4_7D;
-    diff_2.left_subtract(I0_3D);
-    BOOST_CHECK_EQUAL( diff_2, I4_7D );
-}
-*/
-
-/*JODO
-template <class T> 
-void interval_inner_complement_4_bicremental_types()
-{
-    test_inner_complement(interval<T>(), interval<T>());
-    test_inner_complement(interval<T>(), I_D(6,9));
-    test_inner_complement(C_D(2,4), interval<T>());
-    test_inner_complement(I_I(2,5), C_I(3,9));
-    test_inner_complement(I_I(2,4), I_D(6,9));
-    test_inner_complement(I_D(7,9), C_I(0,3));
-}
 */
 
 #endif // __test_itl_interval_hpp_JOFA_081006__
Modified: sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -14,8 +14,9 @@
 // interval instance types
 #include "../test_type_lists.hpp"
 #include "../test_value_maker.hpp"
+#include "../test_interval_laws.hpp"
 
-#include <boost/itl/interval.hpp>
+//CL #include <boost/itl/interval.hpp>
 
 using namespace std;
 using namespace boost;
@@ -73,87 +74,121 @@
 {         distant_intervals_4_numeric_continuous_types<T, std::less>(); }
 
 
-/*
+//- sta.asy.{dis|con} ----------------------------------------------------------
+//- n tests for right_open_inverval --------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_ctor_4_ordered_types, T, ordered_types)
+{                       interval_ctor_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_4_ordered_types, T, discrete_types)
+{          singelizable_interval_4_ordered_types<right_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_right_open_interval_4_bicremental_types, T, discrete_types)
+{         singelizable_interval_4_bicremental_types<right_open_interval<T> >(); }
+
+//- n tests for left_open_inverval ---------------------------------------------
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_ctor_4_ordered_types, T, ordered_types)
+{                     interval_ctor_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_4_ordered_types_singelizable, T, signed_discrete_types)
+{        singelizable_interval_4_ordered_types<left_open_interval<T> >(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(fastest_itl_left_open_interval_4_bicremental_types, T, discrete_types)
+{        singelizable_interval_4_bicremental_types<left_open_interval<T> >(); }
+
 //- dyn.dis --------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_discrete_interval_ctor_4_discrete_types_base)
-{                     interval_ctor_4_ordered_types<discrete_interval<discrete_type_1> >(); }
+(fastest_itl_discrete_interval_ctor_4_discrete_types_base, T, discrete_types)
+{                     interval_ctor_4_ordered_types<discrete_interval<T> >(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_discrete_interval_ctor_4_discrete_types_dynamic)
-{             dynamic_interval_ctor_4_ordered_types<discrete_interval<discrete_type_2> >(); }
+(fastest_itl_discrete_interval_ctor_4_discrete_types_dynamic, T, discrete_types)
+{             dynamic_interval_ctor_4_ordered_types<discrete_interval<T> >(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_discrete_interval_4_ordered_types)
-{        singelizable_interval_4_ordered_types<discrete_interval<discrete_type_3> >(); }
+(fastest_itl_discrete_interval_4_ordered_types, T, discrete_types)
+{        singelizable_interval_4_ordered_types<discrete_interval<T> >(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_discrete_interval_4_bicremental_types)
-{        singelizable_interval_4_bicremental_types<discrete_interval<discrete_type_3> >(); }
+(fastest_itl_discrete_interval_4_bicremental_types, T, discrete_types)
+{        singelizable_interval_4_bicremental_types<discrete_interval<T> >(); }
 
 //- dyn.con --------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_continuous_interval_ctor_4_continuous_types_base)
-{                       interval_ctor_4_ordered_types<continuous_interval<continuous_type_1> >(); }
+(fastest_itl_continuous_interval_ctor_4_continuous_types_base, T, continuous_types)
+{                       interval_ctor_4_ordered_types<continuous_interval<T> >(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_continuous_interval_ctor_4_continuous_types_dynamic)
-{               dynamic_interval_ctor_4_ordered_types<continuous_interval<continuous_type_2> >(); }
+(fastest_itl_continuous_interval_ctor_4_continuous_types_dynamic, T, continuous_types)
+{               dynamic_interval_ctor_4_ordered_types<continuous_interval<T> >(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_continuous_interval_4_continuous_types_singelizable)
-{          singelizable_interval_4_ordered_types<continuous_interval<continuous_type_3> >(); }
-*/
+(fastest_itl_continuous_interval_4_continuous_types_singelizable, T, continuous_types)
+{          singelizable_interval_4_ordered_types<continuous_interval<T> >(); }
 
-/*
+//------------------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_ctor_4_bicremental_types, T, bicremental_types)
-{         interval_ctor_4_bicremental_types<T>(); }
+(fastest_itl_distant_intervals_4_discrete_types, T, discrete_types)
+{            distant_intervals_4_discrete_types<T, std::less>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_ctor_4_integral_types, T, integral_types)
-{         interval_ctor_4_integral_types<T>(); }
+(fastest_itl_distant_intervals_4_numeric_continuous_types, T, numeric_continuous_types)
+{            distant_intervals_4_numeric_continuous_types<T, std::less>(); }
 
+//------------------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_ctor_specific)
-{         interval_ctor_specific(); }
+(fastest_itl_dynamic_interval_bounds_4_bicremental_types, T, bicremental_types)
+{            dynamic_interval_bounds_4_bicremental_types<T>(); }
 
+//==============================================================================
+//==============================================================================
+//JODO old tests are not adapted to static_intervals
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_equal_4_integral_types, T, integral_types)
-{         interval_equal_4_integral_types<T>(); }
+(fastest_itl_interval_equal_4_integral_types, T, integral_types)
+{            interval_equal_4_integral_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_less_4_integral_types, T, integral_types)
-{         interval_less_4_integral_types<T>(); }
+(fastest_itl_interval_less_4_integral_types, T, integral_types)
+{            interval_less_4_integral_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
-{         interval_equal_4_bicremental_continuous_types<T>(); }
+(fastest_itl_interval_touches_4_bicremental_types, T, bicremental_types)
+{            interval_touches_4_bicremental_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_touches_4_bicremental_types, T, bicremental_types)
-{         interval_touches_4_bicremental_types<T>(); }
+(fastest_itl_interval_touches_4_integral_types, T, integral_types)
+{            interval_touches_4_integral_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_touches_4_integral_types, T, integral_types)
-{         interval_touches_4_integral_types<T>(); }
+(fastest_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
+{            interval_subtract_4_bicremental_types<T>(); }
 
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_inplace_intersect_4_bicremental_types, T, bicremental_types)
-{         interval_inplace_intersect_4_bicremental_types<T>(); }
+#ifndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
+BOOST_AUTO_TEST_CASE
+(fastest_itl_interval_ctor_specific)
+{            interval_ctor_specific(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
-{         interval_infix_intersect_4_bicremental_types<T>(); }
+(fastest_itl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{            interval_equal_4_bicremental_continuous_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
-{         interval_subtract_4_bicremental_types<T>(); }
-*/
+(fastest_itl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
+{            interval_infix_intersect_4_bicremental_types<T>(); }
+
+#else
 
-/*JODO
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(test_itl_interval_inner_complement_4_bicremental_types, T, bicremental_types)
-{         interval_inner_complement_4_bicremental_types<T>(); }
-*/
+(fastest_itl_interval_infix_intersect_4_bicremental_types, T, discrete_types)
+{            interval_infix_intersect_4_bicremental_types<T>(); }
+
+#endif // ndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
+
 
Modified: sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -10,141 +10,6 @@
 
 #include <boost/itl/interval_set.hpp>
 
-/*CL after check
-template <class T, ITL_COMPARE Compare, 
-          ITL_INTERVAL(ITL_COMPARE)  Interval>
-void interval_ctor_4_ordered_types()
-{
-    typedef Interval<T,Compare> IntervalT;
-    // An empty interval is defined as the closed interval [1,0]
-    BOOST_CHECK_EQUAL(itl::is_empty(IntervalT()), true);
-    BOOST_CHECK_EQUAL(cardinality(IntervalT()), itl::identity_element<typename itl::size_type_of<T>::type>::value());
-    BOOST_CHECK_EQUAL(itl::size(IntervalT()), itl::identity_element<typename itl::size_type_of<T>::type>::value());
-    BOOST_CHECK_EQUAL(IntervalT().lower(), itl::identity_element<T>::value());
-    BOOST_CHECK_EQUAL(IntervalT().upper(), itl::identity_element<T>::value());
-    BOOST_CHECK_EQUAL(IntervalT(), IntervalT());
-    BOOST_CHECK_EQUAL(IntervalT(), IntervalT(itl::identity_element<T>::value(), itl::identity_element<T>::value()));
-    BOOST_CHECK_EQUAL(IntervalT(), IntervalT(itl::identity_element<T>::value(), itl::identity_element<T>::value(), interval_bounds::right_open()));
-}
-
-
-template <class T, ITL_COMPARE Compare, 
-          ITL_INTERVAL(ITL_COMPARE)  Interval>
-void interval_ctor_4_bicremental_types()
-{
-    typedef Interval<T,Compare> IntervalT;
-
-    BOOST_CHECK_EQUAL( T(), pred(succ(T())));
-    BOOST_CHECK_EQUAL( itl::identity_element<T>::value(), pred(succ(itl::identity_element<T>::value()))       );
-    BOOST_CHECK_EQUAL( itl::unit_element<T>::value(),    succ(itl::identity_element<T>::value())             );
-    BOOST_CHECK_EQUAL( interval<T>().length(),   itl::identity_element<typename difference_type_of<T>::type>::value() );
-
-    T v4 = make<T>(4);
-    IntervalT I4_4I(v4);
-    BOOST_CHECK_EQUAL( I4_4I.bounds() == interval_bounds::closed(),      true  );
-    BOOST_CHECK_EQUAL( I4_4I.bounds() == interval_bounds::left_open(),   false );
-    BOOST_CHECK_EQUAL( I4_4I.bounds() == interval_bounds::left_open(),   false );
-    BOOST_CHECK_EQUAL( I4_4I.bounds() == interval_bounds::right_open(),  false );
-    BOOST_CHECK_EQUAL( I4_4I.bounds() == interval_bounds::open(),        false );
-    //JODO
-    //BOOST_CHECK_EQUAL( I4_4I.is_left(closed_bounded),  true  );
-    //BOOST_CHECK_EQUAL( I4_4I.is_right(closed_bounded), true  );
-    //BOOST_CHECK_EQUAL( I4_4I.is_left(open_bounded),    false );
-    //BOOST_CHECK_EQUAL( I4_4I.is_right(open_bounded),   false );
-
-    BOOST_CHECK_EQUAL( I4_4I.lower(),             v4    );
-    BOOST_CHECK_EQUAL( I4_4I.upper(),             v4    );
-
-    BOOST_CHECK_EQUAL( itl::contains(I4_4I, v4),       true  );
-    BOOST_CHECK_EQUAL( itl::contains(I4_4I, I4_4I),    true  );
-    BOOST_CHECK_EQUAL( within(I4_4I, I4_4I),      true  );
-    BOOST_CHECK_EQUAL( I4_4I,                     I4_4I );
-    BOOST_CHECK_EQUAL( cardinality(I4_4I),        unit_element<typename interval<T>::size_type>::value() );
-    BOOST_CHECK_EQUAL( itl::size(I4_4I),          unit_element<typename interval<T>::size_type>::value() );
-
-    IntervalT j_4_4(I4_4I);
-    BOOST_CHECK_EQUAL( I4_4I, j_4_4 );
-    IntervalT k_4_4;
-    k_4_4 = j_4_4;
-    BOOST_CHECK_EQUAL( I4_4I, k_4_4 );
-
-    //JODO
-    //T v2 = make<T>(2);
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4),    interval<T>(v2, v4) );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4),    interval<T>(v2, v4, closed_bounded) );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4), interval<T>(v2, v4, right_open) );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4),  interval<T>(v2, v4, left_open) );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4),      interval<T>(v2, v4, open_bounded) );
-
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).lower(),               v2 );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).upper(),               v4 );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).boundtype(),           closed_bounded );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).bounds() == interval_bounds::closed_bounded(),    true );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_left(closed_bounded),    true );
-    //BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_right(closed_bounded),   true );
-
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).lower(),            v2 );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).upper(),            v4 );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).boundtype(),        right_open );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).bounds() == interval_bounds::right_open(),     true );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).is_left(closed_bounded), true );
-    //BOOST_CHECK_EQUAL( interval<T>::right_open(v2, v4).is_right(open_bounded),  true );
-
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).lower(),             v2 );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).upper(),             v4 );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).boundtype(),         left_open );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).bounds() == interval_bounds::left_open(),       true );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).is_left(open_bounded),    true );
-    //BOOST_CHECK_EQUAL( interval<T>::left_open(v2, v4).is_right(closed_bounded), true );
-
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).lower(),                 v2 );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).upper(),                 v4 );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).boundtype(),            open_bounded );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).bounds() == interval_bounds::open_bounded(),               true );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_left(open_bounded),        true );
-    //BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_right(open_bounded),       true );    
-}
-
-//JODO
-//template <class T, ITL_COMPARE Compare, 
-//          ITL_INTERVAL(ITL_COMPARE)  Interval>
-//void interval_equal_4_bicremental_continuous_types()
-//{
-//    T v3 = make<T>(3);
-//    T v7 = make<T>(7);
-//    BOOST_CHECK_EQUAL(interval<T>(), interval<T>(v7,v3));
-//
-//    //I: (I)nside  = closed bound
-//    //O: (O)utside = open bound
-//    interval<T> I3_7I = interval<T>::closed(v3,v7);
-//    interval<T> I3_7D = interval<T>::right_open(v3,v7);
-//    interval<T> C3_7I = interval<T>::left_open(v3,v7);
-//    interval<T> C3_7D = interval<T>::open(v3,v7);
-//
-//    BOOST_CHECK_EQUAL( I3_7I ,  I3_7I  );    
-//    BOOST_CHECK_EQUAL( I3_7I == I3_7D, false  );    
-//    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false  );    
-//    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );    
-//    BOOST_CHECK_EQUAL( I3_7I != I3_7D, true  );    
-//    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true  );    
-//    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );    
-//
-//    BOOST_CHECK_EQUAL( I3_7D ,  I3_7D  );    
-//    BOOST_CHECK_EQUAL( I3_7D == C3_7I, false  );    
-//    BOOST_CHECK_EQUAL( I3_7D == C3_7D, false );    
-//    BOOST_CHECK_EQUAL( I3_7D != C3_7I, true  );    
-//    BOOST_CHECK_EQUAL( I3_7D != C3_7D, true );    
-//
-//    BOOST_CHECK_EQUAL( C3_7I ,  C3_7I  );    
-//    BOOST_CHECK_EQUAL( C3_7I == C3_7D, false );    
-//    BOOST_CHECK_EQUAL( C3_7I != C3_7D, true );    
-//
-//    BOOST_CHECK_EQUAL( C3_7D,   C3_7D  );    
-//} 
-
-*/
-
-
 template <class DomainT, ITL_COMPARE Compare, 
           ITL_INTERVAL(ITL_COMPARE)  Interval>
 void test_inner_complement(const ITL_INTERVAL_TYPE(Interval,DomainT,Compare)& itv1,
@@ -198,6 +63,240 @@
     test_inner_complement<DomainT, std::less, IntervalT>(itv1, itv2);
 }
 
+#ifndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
+void interval_ctor_specific()
+{
+    BOOST_CHECK_EQUAL(itl::length(_interval<double>::type()), 0.0);
+    BOOST_CHECK_EQUAL(itl::cardinality(_interval<double>::closed(5.0, 5.0)), 1);
+    BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::closed("test", "test")), 1);
+    BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::closed("best","test")), 
+                      itl::cardinality(_interval<double>::closed(0.0,0.1)));
+    BOOST_CHECK_EQUAL(itl::cardinality(_interval<std::string>::right_open("best","test")), 
+                      itl::infinity<size_type_of<_interval<std::string>::type>::type >::value() );
+    BOOST_CHECK_EQUAL(itl::cardinality(_interval<double>::right_open(0.0, 1.0)), 
+                      itl::infinity<size_type_of<_interval<double>::type>::type >::value() );
+}
+
+#endif // ndef ITL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+
+template <class T> 
+void interval_equal_4_integral_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+    T v2 = make<T>(2);
+    T v3 = make<T>(3);
+    T v7 = make<T>(7);
+    T v8 = make<T>(8);
+    BOOST_CHECK_EQUAL(IntervalT(), IntervalT(v7,v3));
+
+    //I: (I)nside  = closed bound
+    //C: left open bound
+    //D: right open bound
+    IntervalT  I3_7I  = _interval<T>::closed(v3,v7);
+    IntervalT  I3__8D = _interval<T>::right_open(v3,v8);
+    IntervalT C2__7I  = _interval<T>::left_open(v2,v7);
+    IntervalT C2___8D = _interval<T>::open(v2,v8);
+
+    BOOST_CHECK_EQUAL(  I3_7I ,  I3_7I  );    
+    BOOST_CHECK_EQUAL(  I3_7I ,  I3__8D );    
+    BOOST_CHECK_EQUAL(  I3_7I , C2__7I  );    
+    BOOST_CHECK_EQUAL(  I3_7I , C2___8D );    
+
+    BOOST_CHECK_EQUAL(  I3__8D,  I3__8D );    
+    BOOST_CHECK_EQUAL(  I3__8D, C2__7I  );    
+    BOOST_CHECK_EQUAL(  I3__8D, C2___8D );    
+
+    BOOST_CHECK_EQUAL( C2__7I , C2__7I  );    
+    BOOST_CHECK_EQUAL( C2__7I , C2___8D );    
+
+    BOOST_CHECK_EQUAL( C2___8D, C2___8D );    
+}
+
+template <class T> 
+void interval_less_4_integral_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+    T v2 = make<T>(2);
+    T v3 = make<T>(3);
+    T v4 = make<T>(4);
+    T v7 = make<T>(7);
+    T v8 = make<T>(8);
+    BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v7,v3), false);
+    BOOST_CHECK_EQUAL(_interval<T>::open(v2,v3) < _interval<T>::right_open(v7,v7), false);
+    BOOST_CHECK_EQUAL(_interval<T>::left_open(v3,v3) < _interval<T>::closed(v7,v3), false);
+
+    BOOST_CHECK_EQUAL(IntervalT() < IntervalT(v3,v4), true);
+    BOOST_CHECK_EQUAL(_interval<T>::open(v2,v3) < _interval<T>::right_open(v7,v8), true);
+
+    //I: (I)nside  = closed bound
+    //C: left open bound
+    //D: right open bound
+    IntervalT  I3_7I  = _interval<T>::closed(v3,v7);
+    IntervalT  I4_7I  = _interval<T>::closed(v4,v7);
+
+    IntervalT  I3__8D = _interval<T>::right_open(v3,v8);
+    IntervalT C2__7I  = _interval<T>::left_open(v2,v7);
+    IntervalT C2___8D = _interval<T>::open(v2,v8);
+
+    BOOST_CHECK_EQUAL(  I3_7I <  I3_7I  , false);    
+    BOOST_CHECK_EQUAL(  I3_7I <  I3__8D , false);    
+    BOOST_CHECK_EQUAL(  I3_7I < C2__7I  , false);    
+    BOOST_CHECK_EQUAL(  I3_7I < C2___8D , false);    
+
+    BOOST_CHECK_EQUAL(  I3_7I <  I4_7I  , true);    
+
+
+    BOOST_CHECK_EQUAL(  I3__8D<  I3__8D , false);    
+    BOOST_CHECK_EQUAL(  I3__8D< C2__7I  , false);    
+    BOOST_CHECK_EQUAL(  I3__8D< C2___8D , false);    
+
+    BOOST_CHECK_EQUAL( C2__7I < C2__7I  , false);    
+    BOOST_CHECK_EQUAL( C2__7I < C2___8D , false);    
+
+    BOOST_CHECK_EQUAL( C2___8D< C2___8D , false);    
+}
+
+template <class T> 
+void interval_equal_4_bicremental_continuous_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+    T v3 = make<T>(3);
+    T v7 = make<T>(7);
+    BOOST_CHECK_EQUAL(IntervalT(), IntervalT(v7,v3));
+
+    //I: (I)nside  = closed bound
+    //O: (O)utside = open bound
+    IntervalT I3_7I = _interval<T>::closed(v3,v7);
+    IntervalT I3_7D = _interval<T>::right_open(v3,v7);
+    IntervalT C3_7I = _interval<T>::left_open(v3,v7);
+    IntervalT C3_7D = _interval<T>::open(v3,v7);
+
+    BOOST_CHECK_EQUAL( I3_7I ,  I3_7I  );    
+    BOOST_CHECK_EQUAL( I3_7I == I3_7D, false  );    
+    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false  );    
+    BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );    
+    BOOST_CHECK_EQUAL( I3_7I != I3_7D, true  );    
+    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true  );    
+    BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );    
+
+    BOOST_CHECK_EQUAL( I3_7D ,  I3_7D  );    
+    BOOST_CHECK_EQUAL( I3_7D == C3_7I, false  );    
+    BOOST_CHECK_EQUAL( I3_7D == C3_7D, false );    
+    BOOST_CHECK_EQUAL( I3_7D != C3_7I, true  );    
+    BOOST_CHECK_EQUAL( I3_7D != C3_7D, true );    
+
+    BOOST_CHECK_EQUAL( C3_7I ,  C3_7I  );    
+    BOOST_CHECK_EQUAL( C3_7I == C3_7D, false );    
+    BOOST_CHECK_EQUAL( C3_7I != C3_7D, true );    
+
+    BOOST_CHECK_EQUAL( C3_7D,   C3_7D  );    
+} 
+
+template <class T> 
+void interval_touches_4_bicremental_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+    T v3 = make<T>(3);
+    T v7 = make<T>(7);
+    T v9 = make<T>(9);
+
+    IntervalT I3_7D = _interval<T>::right_open(v3,v7);
+    IntervalT I7_9I = _interval<T>::closed(v7,v9);
+    BOOST_CHECK_EQUAL( itl::touches(I3_7D, I7_9I), true );    
+
+    IntervalT I3_7I = _interval<T>::closed(v3,v7);
+    IntervalT C7_9I = _interval<T>::left_open(v7,v9);
+    BOOST_CHECK_EQUAL( itl::touches(I3_7I, C7_9I), true );
+
+    BOOST_CHECK_EQUAL( itl::touches(I3_7D, C7_9I), false );    
+    BOOST_CHECK_EQUAL( itl::touches(I3_7I, I7_9I), false );    
+}
+
+template <class T> 
+void interval_touches_4_integral_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+    T v3 = make<T>(3);
+    T v6 = make<T>(6);
+    T v7 = make<T>(7);
+    T v9 = make<T>(9);
+
+    IntervalT I3_6I = _interval<T>::closed(v3,v6);
+    IntervalT I7_9I = _interval<T>::closed(v7,v9);
+    BOOST_CHECK_EQUAL( itl::touches(I3_6I, I7_9I), true );    
+
+    IntervalT I3_7D = _interval<T>::right_open(v3,v7);
+    IntervalT C6_9I = _interval<T>::left_open(v6,v9);
+    BOOST_CHECK_EQUAL( itl::touches(I3_7D, C6_9I), true );
+}
+
+template <class T> 
+void interval_infix_intersect_4_bicremental_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+
+    IntervalT section;
+    IntervalT I3_7D = I_D(3,7);
+
+    IntervalT I0_3D = I_D(0,3);
+    section = I3_7D & I0_3D;
+    BOOST_CHECK_EQUAL( itl::disjoint(I0_3D, I3_7D), true );
+    BOOST_CHECK_EQUAL( itl::is_empty(section), true );
+    BOOST_CHECK_EQUAL( section, IntervalT() );
+
+    IntervalT I0_5D = I_D(0,5);
+    section = I3_7D & I0_5D;
+    BOOST_CHECK_EQUAL( section, I_D(3,5) );
+
+    IntervalT I0_9D = I_D(0,9);
+    section = I3_7D & I0_9D;
+    BOOST_CHECK_EQUAL( section, I3_7D );
+
+    IntervalT I4_5I = I_I(4,5);
+    section = I3_7D & I4_5I;
+    BOOST_CHECK_EQUAL( section, I4_5I );
+
+    IntervalT C4_6D = C_D(4,6);
+    section = I3_7D & C4_6D;
+    BOOST_CHECK_EQUAL( section, C4_6D );
+
+    IntervalT C4_9I = C_I(4,9);
+    section = I3_7D & C4_9I;
+    BOOST_CHECK_EQUAL( section, C_D(4,7) );
+
+    IntervalT I7_9I = I_I(7,9);
+    section = I3_7D & I7_9I;
+    BOOST_CHECK_EQUAL( itl::exclusive_less(I3_7D, I7_9I), true );
+    BOOST_CHECK_EQUAL( itl::disjoint(I3_7D, I7_9I), true );
+    BOOST_CHECK_EQUAL( itl::is_empty(section), true );
+}
+
+template <class T> 
+void interval_subtract_4_bicremental_types()
+{
+    typedef typename _interval<T>::type IntervalT;
+
+    IntervalT diff_1, diff_2;
+    IntervalT I0_3D = I_D(0,3);
+    IntervalT I2_6D = I_D(2,6);
+    IntervalT I4_7D = I_D(4,7);
+    IntervalT I6_7D = I_D(6,7);
+    IntervalT I2_4D = I_D(2,4);
+
+    diff_1 = right_subtract(I2_6D, I4_7D);
+    BOOST_CHECK_EQUAL( diff_1, I2_4D );
+
+    diff_1 = right_subtract(I0_3D, I4_7D);
+    BOOST_CHECK_EQUAL( diff_1, I0_3D );
+    
+    // ---------------------------------
+    diff_1 = left_subtract(I4_7D, I2_6D);
+    BOOST_CHECK_EQUAL( diff_1, I6_7D );
+
+    diff_1 = left_subtract(I4_7D, I0_3D);
+    BOOST_CHECK_EQUAL( diff_1, I4_7D );
+}
 
 
 #endif // __test_itl_interval_shared_hpp_JOFA_100306__
Modified: sandbox/itl/libs/itl/test/test_laws.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_laws.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_laws.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -5,8 +5,8 @@
       (See accompanying file LICENCE.txt or copy at
            http://www.boost.org/LICENSE_1_0.txt)
 +-----------------------------------------------------------------------------*/
-#ifndef __test_itl_laws_h_JOFA_090119__
-#define __test_itl_laws_h_JOFA_090119__
+#ifndef BOOST_LIBS_ICL_TEST_ITL_LAWS_HPP_JOFA_090119
+#define BOOST_LIBS_ICL_TEST_ITL_LAWS_HPP_JOFA_090119
 
 #include <boost/itl/type_traits/identity_element.hpp>
 
Modified: sandbox/itl/libs/itl/test/test_value_maker.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_value_maker.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_value_maker.hpp	2010-10-13 09:19:32 EDT (Wed, 13 Oct 2010)
@@ -135,13 +135,13 @@
 // Very short value denotation for intervals
 // Assumption typename T and IntervalT exists in scope
 //I_I : [a,b]
-#define I_I(low,up) IntervalT::closed   (make<T>(low), make<T>(up))
+#define I_I(low,up) _interval<T>::closed    (make<T>(low), make<T>(up))
 //I_D : [a,b)
-#define I_D(low,up) IntervalT::right_open(make<T>(low), make<T>(up))
+#define I_D(low,up) _interval<T>::right_open(make<T>(low), make<T>(up))
 //C_I : (a,b]
-#define C_I(low,up) IntervalT::left_open (make<T>(low), make<T>(up))
+#define C_I(low,up) _interval<T>::left_open (make<T>(low), make<T>(up))
 //C_D : (a,b)
-#define C_D(low,up) IntervalT::open     (make<T>(low), make<T>(up))
+#define C_D(low,up) _interval<T>::open      (make<T>(low), make<T>(up))
 
 #define MK_I(ItvT,low,up) ItvT(make<T>(low), make<T>(up))