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

Summary: Editor shows error for " pow(valarray,1.0).sum() " However it runs normally!!
Product: cnd Reporter: OmarElGabry
Component: Code ModelAssignee: issues@cnd <issues>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P4    
Version: 7.2.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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