[CppAD] compile error with boost ublas
Brad Bell
bradbell at seanet.com
Tue Apr 14 11:28:40 EDT 2015
I have been able to reproduce Casper's problem below and added a bug
report; see
https://github.com/coin-or/CppAD/blob/master/bug/boost_lu.sh
The error occurs in boost code of the form
return norm_inf (e1 - e2) < epsilon
I think the problem here is that epsilon is coming from std::numeric_limits.
It seems that there has been a change in the C++ standard. The old
standard used to say that one should not place anything in the std
namespace. The new standard seems to allow for one specializing
std::numeric_limits<Type> where Type is a user defined type. It seems
that boost is using this; see
http://www.boost.org/doc/libs/1_56_0/libs/multiprecision/doc/html/boost_multiprecision/tut/limits/constants.html
On 4/13/2015 11:15 PM, Peter Caspers wrote:
> Hi Brad,
>
> the following code does not compile ( I tried with boost_1_57_0 and
> gcc 4.8.2 ). Can you check this please ?
>
> Thanks
> Peter
>
> #include <cppad/cppad.hpp>
> #include <boost/numeric/ublas/lu.hpp>
>
> int main() {
> typedef CppAD::AD<double> T;
> boost::numeric::ublas::matrix<T> a(5,5);
> boost::numeric::ublas::permutation_matrix<std::size_t> pert(5);
> // lu decomposition
> const std::size_t s = lu_factorize(a, pert);
> return 0;
> }
> _______________________________________________
> CppAD mailing list
> CppAD at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cppad
>
More information about the CppAD
mailing list