This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

libstdc++/1926: valarray_meta.h: typo line 300



>Number:         1926
>Category:       libstdc++
>Synopsis:       valarray_meta.h: typo line 300
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 10 01:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     mjbedy@mediaone.net
>Release:        CVS as of Feb 10, 2001
>Organization:
>Environment:
i686-linux
>Description:
Line 300, valarray_meta.h, __e should be __v. Causes compile error.
>How-To-Repeat:

#include <valarray>
#include <iostream>

using namespace std;

int addone(const int &x) 
{ 
    return x+1;
}

        
        
main()
{
    valarray<int> prog(0, 60);
    valarray<int> r(1, 60);
    
    r[4] = 7;
    
    prog = prog.apply(addone);
    
    cout << prog.sum() << "  " << r.sum() << endl;
    
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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