|
Ublas : |
From: John Maddock (john_at_[hidden])
Date: 2006-10-04 05:18:26
Hi folks,
I've been using ublas' LU decomposition code with NTL::RR quite
successfully, but the following patch is required to get things to compile.
The issue is that the std lib functions aren't in namespace std but
namespace NTL, and should be found via ADL. Can this be applied?
Many thanks,
John.
Index: boost/numeric/ublas/traits.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/numeric/ublas/traits.hpp,v
retrieving revision 1.39
diff -u -r1.39 traits.hpp
--- boost/numeric/ublas/traits.hpp 6 Nov 2005 14:57:14 -0000 1.39
+++ boost/numeric/ublas/traits.hpp 4 Oct 2006 09:14:43 -0000
@@ -86,13 +86,17 @@
static
BOOST_UBLAS_INLINE
real_type type_abs (const_reference t) {
- return std::abs (t); // must use explict std:: as bultin
types a
re not in std namespace
+ // we'll find either std::abs or else another version via ADL:
+ using namespace std;
+ return abs (t);
}
static
BOOST_UBLAS_INLINE
value_type type_sqrt (const_reference t) {
- // force a type conversion back to value_type for intgral
types
- return value_type (std::sqrt (t)); // must use explict std::
as b
ultin types are not in std namespace
+ using namespace std;
+ // force a type conversion back to value_type for intgral types
+ // we'll find either std::sqrt or else another version via ADL:
+ return value_type (sqrt (t));
}