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 202383

Summary: syntax highlighting of C++ lambda parameters report "undefined reference"
Product: cnd Reporter: jjeremiah
Component: Code ModelAssignee: issues@cnd <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.0.1   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: screenshot

Description jjeremiah 2011-09-21 04:18:08 UTC
Created attachment 110939 [details]
screenshot

Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb)
C++ plugin: Version 1.14.2.1
Compiler: MinGW g++ 4.6.1

In a Netbeans C++ project, if I write:

#include <iostream>
#include <vector>
#include <algorithm>
int main()
{
    std::vector<int> container = {1,2,3,4};
    std::for_each(container.begin(),container.end(),
        [] (int x) {std::cout << "\"" << x << "\"\n";});
}

the editor highlights all occurances of x in the line with the lambda and says "unable to resolve identifier x" even though the program compiles and runs with no problem.

So the syntax highlighting of lambda parameters doesn't seem to be correct.
It's a low priority because the code compiles and runs fine.
Comment 1 nnnnnk 2011-10-06 11:59:19 UTC
We do not support C++11.