http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51540
Bug #: 51540
Summary: partial_sum (int *, int *, int *, multiplies < int >)
does not use operator +(complex, complex)
Classification: Unclassified
Product: gcc
Version: 4.5.1
URL: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen
/a01567.html#a17bad49fa9fb1c5c41d019b16970fe9e
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
Host: i586-suse-linux
Target: i586-suse-linux
Build: i586-suse-linux
The following code fails to run:
int main ()
{
int x [02] = { 0, 01 };
::std ::partial_sum (x, x + 02, x, ::std ::multiplies < int > ());
assert (+x [01] == 01);
return +EXIT_SUCCESS; }
Actual result:
int main(): Assertion `+x [01] == 01' failed.
Expected result:
I do not know,
as the documentation does not say which complex class should be used.
Maybe it should not compile at all.