Package: libjama-dev Version: 1.2.2-1 Severity: normal
The following code compiles with errors:
#include <jama/jama_svd.h> #include <tnt/tnt.h>
TNT::Array2D<double> matrix(2,2,1.0); JAMA::SVD<double> decomp(matrix);
The first of many errors of the same kind:
g++ -c jamatest.cc
/usr/include/jama/jama_svd.h: In constructor `JAMA::SVD<Real>::SVD(const
TNT::Array2D<T>&) [with Real = double]':
jamatest.cc:5: instantiated from here
/usr/include/jama/jama_svd.h:55: error: call of overloaded `min(int&, int&)' is
ambiguous
/usr/include/c++/3.3/bits/stl_algobase.h:149: error: candidates are: const _Tp&
std::min(const _Tp&, const _Tp&) [with _Tp = int]
/usr/include/tnt/tnt_math_utils.h:35: error: Scalar
TNT::min(const Scalar&, const Scalar&) [with Scalar = int]
The problem is in the following two lines in file jama_svd.h
using namespace TNT; using namespace std;
It seems that removing 'using namespace std;' and exchanging all min (and max) with std::min (std::max) is enough to fix the bug.
-- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686)
$ g++ --version g++ (GCC) 3.3.5 (Debian 1:3.3.5-8)
Versions of packages libjama-dev depends on: ii libtnt-dev 1.2.5-3
-- Michal Wasiak
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]