Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56619 - trunk/libs/numeric/ublas/test
From: guwi17_at_[hidden]
Date: 2009-10-06 16:01:16


Author: guwi17
Date: 2009-10-06 16:01:15 EDT (Tue, 06 Oct 2009)
New Revision: 56619
URL: http://svn.boost.org/trac/boost/changeset/56619

Log:
fix MSVC7.1 compile failure by free function begin(it, type) and end(it, type) instead of the member functions of '''it'''

Text files modified:
   trunk/libs/numeric/ublas/test/triangular_access.cpp | 19 +++++++++++++++++++
   1 files changed, 19 insertions(+), 0 deletions(-)

Modified: trunk/libs/numeric/ublas/test/triangular_access.cpp
==============================================================================
--- trunk/libs/numeric/ublas/test/triangular_access.cpp (original)
+++ trunk/libs/numeric/ublas/test/triangular_access.cpp 2009-10-06 16:01:15 EDT (Tue, 06 Oct 2009)
@@ -14,6 +14,10 @@
 
 #include "common/testhelper.hpp"
 
+#ifdef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
+using boost::numeric::ublas::iterator1_tag;
+using boost::numeric::ublas::iterator2_tag;
+#endif
 
 template < class MAT >
 void test_iterator( MAT & A ) {
@@ -26,8 +30,13 @@
   typename MAT::iterator1 it1_end = A.end1();
   
   for ( ; it1 != it1_end; ++it1 ) {
+#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
     typename MAT::iterator2 it2 = it1.begin();
     typename MAT::iterator2 it2_end = it1.end();
+#else
+ typename MAT::iterator2 it2 = begin(it1, iterator1_tag());
+ typename MAT::iterator2 it2_end = end(it1, iterator1_tag());
+#endif
     for ( ; it2 != it2_end ; ++ it2 ) {
 #ifndef NOMESSAGES
       std::cout << "( " << it2.index1() << ", " << it2.index2() << ") " << std::flush;
@@ -52,8 +61,13 @@
   typename MAT::iterator2 it2_end = A.end2();
   
   for ( ; it2 != it2_end; ++it2 ) {
+#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
     typename MAT::iterator1 it1 = it2.begin();
     typename MAT::iterator1 it1_end = it2.end();
+#else
+ typename MAT::iterator1 it1 = begin(it2, iterator2_tag());
+ typename MAT::iterator1 it1_end = end(it2, iterator2_tag());
+#endif
     for ( ; it1 != it1_end ; ++ it1 ) {
 #ifndef NOMESSAGES
       std::cout << "( " << it1.index1() << ", " << it1.index2() << ") " << std::flush;
@@ -81,8 +95,13 @@
   typename MAT::const_iterator1 it1_end = A.end1();
   
   for ( ; it1 != it1_end; ++it1 ) {
+#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
     typename MAT::const_iterator2 it2 = it1.begin();
     typename MAT::const_iterator2 it2_end = it1.end();
+#else
+ typename MAT::const_iterator2 it2 = begin(it1, iterator1_tag());
+ typename MAT::const_iterator2 it2_end = end(it1, iterator1_tag());
+#endif
     for ( ; it2 != it2_end ; ++ it2 ) {
 #ifndef NOMESSAGES
       std::cout << "( " << it2.index1() << ", " << it2.index2() << ") " << std::flush;


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