Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56620 - in branches/release/libs/numeric/ublas: . test
From: guwi17_at_[hidden]
Date: 2009-10-06 17:12:55


Author: guwi17
Date: 2009-10-06 17:12:55 EDT (Tue, 06 Oct 2009)
New Revision: 56620
URL: http://svn.boost.org/trac/boost/changeset/56620

Log:
libs/numeric/ublas/test/triangular_access.cpp: fixed compile failure with MSVC 7.1

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

Modified: branches/release/libs/numeric/ublas/test/triangular_access.cpp
==============================================================================
--- branches/release/libs/numeric/ublas/test/triangular_access.cpp (original)
+++ branches/release/libs/numeric/ublas/test/triangular_access.cpp 2009-10-06 17:12:55 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