Boost logo

Boost :

From: Leopoldo Peralta (lperalta_at_[hidden])
Date: 2007-07-18 11:40:56

When using uBlas objects with boost::rational types, the program fails to
compile throwing this error (MS Visual Studio 2003, SP1)


c:\boost_1_34_0_beta\boost_1_34_0\boost\numeric\ublas\traits.hpp(89): error
C2665: 'abs' : none of the 5 overloads can convert parameter 1 from type
'const ratio'


This code shows the bug:


      typedef boost::rational<int> ratio;


      vector<ratio> r(2);

      r[0] = ratio(2,3);

      r[1] = ratio(2,7);


      ratio dNorm = index_norm_inf(r); <-- Error Line


Any suggestion to fix it?




Leopoldo Peralta

Boost list run by bdawes at, gregod at, cpdaniel at, john at