This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in valarray


Levente Farkas <lfarkas@mindmaker.hu> writes:

| hi,
| the following code:
| -----------------
| #include <valarray>
| using std::valarray;
| 
| int main()
| {
|   valarray<double> a, b;
|   double m = std::abs(a-b).max();
|   return 0;
| }
| -----------------
| give the following error:
| -----------------
| [lfarkas@garfield:/home/lfarkas/tmp]g++ test.cpp 
| test.cpp: In function `int main ()':
| test.cpp:7: no matching function for call to 
| `std::_Expr<std::_UnFunClos<std::_Expr, std::_BinClos<std::minus, 
| std::_ValArray, std::_ValArray, double, double> >, double>::max ()'
| -----------------
| I don't test it with the latest cvs, just:

Hi,

Thanks for you report ; you came across an undocumented well known bug
in the valarray implementation :-).  Fixed in current CVS.

Please, let me know if you have additional problems.

Thanks,

-- Gaby
CodeSourcery, LLC                             http://www.codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]