Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71360 - trunk/libs/icl/test
From: afojgo_at_[hidden]
Date: 2011-04-17 17:05:35


Author: jofaber
Date: 2011-04-17 17:05:34 EDT (Sun, 17 Apr 2011)
New Revision: 71360
URL: http://svn.boost.org/trac/boost/changeset/71360

Log:
Added macro BOOST_ICL_USE_COMPARE_STD_GREATER to change container and interval orderings for the library.
This can be used to change the compare-ordering for whole test-programs. (ticket #5482).
Properties modified:
   trunk/libs/icl/test/ (props changed)
Text files modified:
   trunk/libs/icl/test/portability.hpp | 35 +++++++++++++++++++++++------------
   1 files changed, 23 insertions(+), 12 deletions(-)

Modified: trunk/libs/icl/test/portability.hpp
==============================================================================
--- trunk/libs/icl/test/portability.hpp (original)
+++ trunk/libs/icl/test/portability.hpp 2011-04-17 17:05:34 EDT (Sun, 17 Apr 2011)
@@ -22,17 +22,17 @@
 //ASSUMPTION: Fixed name IntervalMap
 #define ICL_PORT_msvc_7_1_IntervalMap(tp_T, tp_U, tp_Trt) \
 IntervalMap<tp_T, tp_U, tp_Trt \
- ,ICL_COMPARE_INSTANCE(std::less, tp_T) \
+ ,ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T) \
            ,ICL_COMBINE_INSTANCE(icl::inplace_plus, tp_U) \
            ,ICL_SECTION_INSTANCE(icl::inter_section, tp_U) \
- ,ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, ICL_COMPARE_INSTANCE(std::less, tp_T)) \
+ ,ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T)) \
            ,std::allocator>
 
 //ASSUMPTION: Fixed name IntervalSet
 #define ICL_PORT_msvc_7_1_IntervalSet(tp_T) \
 IntervalSet<tp_T \
- ,ICL_COMPARE_INSTANCE(std::less, tp_T) \
- ,ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, ICL_COMPARE_INSTANCE(std::less, tp_T)) \
+ ,ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T) \
+ ,ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T)) \
            ,std::allocator>
 
 
@@ -42,19 +42,30 @@
 #define ICL_IntervalMap_TEMPLATE(tp_T, tp_U, tp_Traits, tp_Trt) \
 template<class tp_T, class tp_U, \
        class tp_Traits = tp_Trt, \
- ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, tp_T), \
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T), \
        ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, tp_U), \
        ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, tp_U), \
        ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, Compare), \
        ICL_ALLOC Alloc = std::allocator>class
 
-
-#define ICL_IntervalSet_TEMPLATE(tp_T) \
-template<class tp_T, \
- ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, tp_T), \
- ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, Compare), \
- ICL_ALLOC Alloc = std::allocator>class
 
+#ifndef ICL_INTERVAL_BITSET_IMPL
 
-#endif // BOOST_ICL_TEST_PORTABILITY_HPP_JOFA_101111
+# define ICL_IntervalSet_TEMPLATE(tp_T) \
+ template<class tp_T, \
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T), \
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, Compare), \
+ ICL_ALLOC Alloc = std::allocator>class
+
+#else
+
+# define ICL_IntervalSet_TEMPLATE(tp_T) \
+ template<class tp_T, \
+ class BitSetT = icl::bits<unsigned long>, \
+ ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, tp_T), \
+ ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, tp_T, Compare), \
+ ICL_ALLOC Alloc = std::allocator>class
 
+#endif //ICL_INTERVAL_BITSET_IMPL
+
+#endif // BOOST_ICL_TEST_PORTABILITY_HPP_JOFA_101111


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk