From:
[email protected]
Package: mcmcpack
Severity: normal
Tags: patch
When building 'mcmcpack' with gcc-3.4 I get the following error:
Scythe_Matrix_Iterator.h: In member function `int SCYTHE::const_reverse_col_major_iterator<T>::get_index() const':
Scythe_Matrix_Iterator.h:1654: error: `current_' undeclared (first use this function)
Scythe_Matrix_Iterator.h:1655: error: `matrix_' undeclared (first use this function)
In file included from MCMCbaselineDA.cc:9:
Scythe_Matrix.h: At global scope:
Scythe_Matrix.h:98: error: using typedef-name `SCYTHE::Matrix<T>::iterator' after `class'
Scythe_Matrix.h:99: error: using typedef-name `SCYTHE::Matrix<T>::const_iterator' after `class'
Scythe_Matrix.h:100: error: using typedef-name `SCYTHE::Matrix<T>::row_major_iterator' after `class'
Scythe_Matrix.h:101: error: using typedef-name `SCYTHE::Matrix<T>::col_major_iterator' after `class'
Scythe_Matrix.h:102: error: using typedef-name `SCYTHE::Matrix<T>::const_row_major_iterator' after `class'
Scythe_Matrix.h:103: error: using typedef-name `SCYTHE::Matrix<T>::const_col_major_iterator' after `class'
Scythe_Matrix.h:104: error: using typedef-name `SCYTHE::Matrix<T>::reverse_row_major_iterator' after `class'
Scythe_Matrix.h:105: error: using typedef-name `SCYTHE::Matrix<T>::const_reverse_row_major_iterator' after `class'
Scythe_Matrix.h:106: error: using typedef-name `SCYTHE::Matrix<T>::reverse_col_major_iterator' after `class'
Scythe_Matrix.h:107: error: using typedef-name `SCYTHE::Matrix<T>::const_reverse_col_major_iterator' after `class'
make[1]: *** [MCMCbaselineDA.o] Error 1
make[1]: Leaving directory `/mcmcpack-0.4-8/src'
ERROR: compilation failed for package 'MCMCpack'
With the attached patch 'mcmcpack' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/mcmcpack-0.4-8/src/Scythe_Matrix.h ./src/Scythe_Matrix.h --- ../tmp-orig/mcmcpack-0.4-8/src/Scythe_Matrix.h 2004-02-04 18:01:57.000000000 +0100
+++ ./src/Scythe_Matrix.h 2004-08-13 14:53:15.692354609 +0200
@@ -94,7 +94,7 @@
reverse_col_major_iterator;
typedef const_reverse_col_major_iterator<ttype>
const_reverse_col_major_iterator;
-
+/*
friend class iterator;
friend class const_iterator;
friend class row_major_iterator;
@@ -105,7 +105,7 @@
friend class const_reverse_row_major_iterator;
friend class reverse_col_major_iterator;
friend class const_reverse_col_major_iterator;
-
+*/
/**** Constructors ****/
/* Default Constructor: Creates a Matrix of size 0. This
@@ -635,6 +635,7 @@
delete[] temp;
}
+public:
/**** Instance Variables ****/
int rows_; // # of rows
int cols_; // # of cols
diff -urN ../tmp-orig/mcmcpack-0.4-8/src/Scythe_Matrix_Iterator.h ./src/Scythe_Matrix_Iterator.h
--- ../tmp-orig/mcmcpack-0.4-8/src/Scythe_Matrix_Iterator.h