This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241413 - Editor shows error for " pow(valarray,1.0).sum() " However it runs normally!!
Summary: Editor shows error for " pow(valarray,1.0).sum() " However it runs normally!!
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.2.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 22:22 UTC by OmarElGabry
Modified: 2014-11-21 13:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description OmarElGabry 2014-02-04 22:22:40 UTC
Try the following code. It will give you a red underline for ".sum()" However it runs normally!

#include <cstdlib>
#include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
#include<iterator>
#include<valarray>
#include<cmath>
using namespace std;


int main() {
double val2[]={1,2,3,4,5};
  valarray<double>va5(val2,5);
        
  valarray<double>va6= 2.0*(va5);

  valarray<double>va7=pow(2.0,va5);

  cout<<pow(va5,1.0).sum()<<endl;
  cout<<pow(va5,va6).sum()<<endl;
    return 0;
}
Comment 1 Alexander Simon 2014-02-05 16:42:03 UTC
Please, do not touch component.
A root cause of the issue is a bug in code model.
Comment 2 Vladimir Voskresensky 2014-11-21 13:56:25 UTC
it works fine for me in trunk