Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-01-25 19:29:33


Author: danieljames
Date: 2008-01-25 19:29:32 EST (Fri, 25 Jan 2008)
New Revision: 42975
URL: http://svn.boost.org/trac/boost/changeset/42975

Log:
Typedef some types before using them, to make life easier for Borland.
Text files modified:
   branches/unordered/trunk/libs/unordered/test/exception/assign_exception_tests.cpp | 8 ++++++--
   branches/unordered/trunk/libs/unordered/test/exception/swap_exception_tests.cpp | 12 ++++++++----
   2 files changed, 14 insertions(+), 6 deletions(-)

Modified: branches/unordered/trunk/libs/unordered/test/exception/assign_exception_tests.cpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/exception/assign_exception_tests.cpp (original)
+++ branches/unordered/trunk/libs/unordered/test/exception/assign_exception_tests.cpp 2008-01-25 19:29:32 EST (Fri, 25 Jan 2008)
@@ -36,10 +36,14 @@
     const test::random_values<T> x_values, y_values;
     const T x,y;
 
+ typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+ typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+ typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
+
     assign_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
         : x_values(count1), y_values(count2),
- x(x_values.begin(), x_values.end(), 0, BOOST_DEDUCED_TYPENAME T::hasher(tag1), BOOST_DEDUCED_TYPENAME T::key_equal(tag1), BOOST_DEDUCED_TYPENAME T::allocator_type(tag1)),
- y(y_values.begin(), y_values.end(), 0, BOOST_DEDUCED_TYPENAME T::hasher(tag2), BOOST_DEDUCED_TYPENAME T::key_equal(tag2), BOOST_DEDUCED_TYPENAME T::allocator_type(tag2)) {}
+ x(x_values.begin(), x_values.end(), 0, hasher(tag1), key_equal(tag1), allocator_type(tag1)),
+ y(y_values.begin(), y_values.end(), 0, hasher(tag2), key_equal(tag2), allocator_type(tag2)) {}
 
     typedef T data_type;
     T init() const { return T(x); }

Modified: branches/unordered/trunk/libs/unordered/test/exception/swap_exception_tests.cpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/exception/swap_exception_tests.cpp (original)
+++ branches/unordered/trunk/libs/unordered/test/exception/swap_exception_tests.cpp 2008-01-25 19:29:32 EST (Fri, 25 Jan 2008)
@@ -48,12 +48,16 @@
     const test::random_values<T> x_values, y_values;
     const T initial_x, initial_y;
 
+ typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+ typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+ typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
+
     swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
         : x_values(count1), y_values(count2),
- initial_x(x_values.begin(), x_values.end(), 0, BOOST_DEDUCED_TYPENAME T::hasher(tag1),
- BOOST_DEDUCED_TYPENAME T::key_equal(tag1), BOOST_DEDUCED_TYPENAME T::allocator_type(tag1)),
- initial_y(y_values.begin(), y_values.end(), 0, BOOST_DEDUCED_TYPENAME T::hasher(tag2),
- BOOST_DEDUCED_TYPENAME T::key_equal(tag2), BOOST_DEDUCED_TYPENAME T::allocator_type(tag2))
+ initial_x(x_values.begin(), x_values.end(), 0, hasher(tag1),
+ key_equal(tag1), allocator_type(tag1)),
+ initial_y(y_values.begin(), y_values.end(), 0, hasher(tag2),
+ key_equal(tag2), allocator_type(tag2))
     {}
 
     struct data_type {


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