Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-04-16 13:34:49


Author: danieljames
Date: 2008-04-16 13:34:48 EDT (Wed, 16 Apr 2008)
New Revision: 44461
URL: http://svn.boost.org/trac/boost/changeset/44461

Log:
Try to get some more tests working on Borland.

Text files modified:
   branches/unordered/trunk/libs/unordered/test/helpers/metafunctions.hpp | 15 ++++++---------
   1 files changed, 6 insertions(+), 9 deletions(-)

Modified: branches/unordered/trunk/libs/unordered/test/helpers/metafunctions.hpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/helpers/metafunctions.hpp (original)
+++ branches/unordered/trunk/libs/unordered/test/helpers/metafunctions.hpp 2008-04-16 13:34:48 EDT (Wed, 16 Apr 2008)
@@ -8,11 +8,7 @@
 
 #include <boost/config.hpp>
 #include <boost/type_traits/is_same.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/identity.hpp>
 #include <boost/mpl/not.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/apply.hpp>
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
 
@@ -82,7 +78,8 @@
 
     // Non Const Value Type
 
- struct map_non_const_value_type
+ template <bool IsMap>
+ struct non_const_value_type_impl
     {
         template <class Container>
         struct apply {
@@ -92,7 +89,8 @@
         };
     };
 
- struct set_non_const_value_type
+ template<>
+ struct non_const_value_type_impl<false>
     {
         template <class Container>
         struct apply {
@@ -102,9 +100,8 @@
     
     template <class Container>
     struct non_const_value_type
- : boost::mpl::apply1<
- BOOST_DEDUCED_TYPENAME boost::mpl::if_<is_map<Container>, map_non_const_value_type, set_non_const_value_type>::type,
- Container>
+ : non_const_value_type_impl< ::test::is_map<Container>::value>::
+ BOOST_NESTED_TEMPLATE apply<Container>
     {
     };
 }


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