Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68616 - in trunk/libs/icl/test: cmp_clang_ttp_passing2_ cmp_clang_ttp_passing_
From: afojgo_at_[hidden]
Date: 2011-02-02 18:57:50


Author: jofaber
Date: 2011-02-02 18:57:48 EST (Wed, 02 Feb 2011)
New Revision: 68616
URL: http://svn.boost.org/trac/boost/changeset/68616

Log:
Refining test on template template parameter passing for clang.
Text files modified:
   trunk/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp | 23 ++++++++++---------
   trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp | 46 ++++++++++++++++++++++++++-------------
   2 files changed, 42 insertions(+), 27 deletions(-)

Modified: trunk/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp
==============================================================================
--- trunk/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp (original)
+++ trunk/libs/icl/test/cmp_clang_ttp_passing2_/cmp_clang_ttp_passing2.cpp 2011-02-02 18:57:48 EST (Wed, 02 Feb 2011)
@@ -12,28 +12,29 @@
 
 template
 <
- template
- <
- class _T,
- ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, _T),
- ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, _T, Compare),
- ICL_ALLOC Alloc = std::allocator
- >
- class IntervalSet,
- class T
+ template
+ <
+ class _T,
+ template<class>class Compare = std::less,
+ class Interval = typename boost::icl::
+ interval_type_default<_T,Compare>::type,
+ template<class>class Alloc = std::allocator
+ >
+ class IntervalSet,
+ class T
>
 bool test_ttp()
 {
     typedef IntervalSet<T> IntervalSetT;
     IntervalSetT test_set;
     test_set.clear();
- return true;
+ return true;
 }
 
 
 BOOST_AUTO_TEST_CASE(dummy)
 {
- bool result = test_ttp<boost::icl::interval_set, int>();
+ bool result = test_ttp<boost::icl::interval_set, int>();
     BOOST_CHECK( result );
 }
 

Modified: trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp
==============================================================================
--- trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp (original)
+++ trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp 2011-02-02 18:57:48 EST (Wed, 02 Feb 2011)
@@ -13,26 +13,40 @@
 
 namespace sep
 {
+ template<class T>class less{};
 
-template<class T>class less{};
-
-template
-<
- class T,
- template<class>class Less = sep::less
->
-class cont
-{
-public:
- bool test()const { return true; }
-};
-
+ template
+ <
+ class T,
+ template<class>class Less = sep::less
+ >
+ class interv
+ {
+ public:
+ typedef interv<T,Less> type;
+ };
+
+ template
+ <
+ class T,
+ template<class>class Less = sep::less,
+ class I = typename sep::interv<T,Less>::type
+ >
+ class cont
+ {
+ public:
+ bool test()const { return true; }
+ };
 }//namespace sep
 
 template
 <
- template<class _T,
- template<class>class _Less = sep::less>
+ template
+ <
+ class _T,
+ template<class>class _Less = sep::less,
+ class I = typename sep::interv<_T,_Less>::type
+ >
     class Cont,
     class T
>
@@ -41,7 +55,7 @@
     typedef Cont<T> cont_type;
     cont_type test_cont;
     return test_cont.test();
-}
+};
 
 BOOST_AUTO_TEST_CASE(dummy)
 {


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