This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: bug in valarray
- To: lfarkas at mindmaker dot hu
- Subject: Re: bug in valarray
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 19 Aug 2000 13:38:28 +0200
- Cc: libstdc++ at sources dot redhat dot com
- Organization: CodeSourcery, LLC
- References: <3997F265.3B102F04@mindmaker.hu>
- Reply-To: libstdc++ at sources dot redhat dot com
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