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.
Product Version: NetBeans IDE 7.2 RC1 (Build 201206272359) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Linux version 2.6.35-22-generic running on i386; UTF-8; en_US (nb) 1) lambda parameters inside a lambda give "unable to resolve identifier" syntax highlighting warning 2) auto parameters give "unable to resolve identifier" syntax hightlighting the following code demonstrates both problems: std::for_each( typeDeclarations.begin() , typeDeclarations.end() , [&] (const TypeDeclOwnerRef& tyDecl) { //both structTypePtr and tyDecl show as unable to resolve identifier auto structTypePtr = Compiler::SymbolResolver::resolveOrCreateModuleType( tyDecl.get() ); } );
It's definitely not a P1 but should be a patch candidate.
By selecting "C++11" under "Project Properties --> C++ Compiler --> C++ Standard", it forces "-std=c++11" argument on GCC. I'm using GCC 4.5.3, and I manually pass it "-std=c++0x" for most C++11 features. Why hardcode the argument? Why not let the user supply their own C++11 argument? Or better yet, detect GCC version! I still want to have the code parser properly parse my C++11 source code, but I can't pass "-std=c++11" to the compiler! We're stuck between a rock and a hard place!
fixed, change set: http://hg.netbeans.org/cnd-main/rev/6b4b141144ee The C++11 editor features are activated in the following use cases: 1. The property of a compilation unit "C++ Compiler->C++ Standard" is C++11. The build action compiles this compilation unit with the flag -std=c++11. This use case is applicable only if compiler supports c++11 standard. 2. The property of a compilation unit "C++ Compiler->C++ Standard" is <Default>. The property of the compilation unit "C++ Compiler->Additional Options" is -std=c++0x (or -std=gnu++0x or -std=gnu++11). The build action compiles this compilation unit with the flag -std=c++0x (or -std=gnu++0x or -std=gnu++11). This use case is applicable if compiler supports intermediate c++11 standard.
*** Bug 216347 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201208160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6b4b141144ee User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #215662 c++11 auto and lambda parameter types not recognized
The fix in build 20120830 resolves only the problem with -std=c++0x option whereas C++11 issue is still in place.
fixed: http://hg.netbeans.org/cnd-main/rev/7dadc116b22c
The fix is verified in build from trunk (Build cnd-build-7928-on-20120831)
verified
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/bf0950efa8e6 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #215662 c++11 auto and lambda parameter types not recognized
comment 9 - verified
verified in 7.2 patch 1 build candidate 20120901
The testcase should be covered now by C++11 accuracy tests
Created attachment 146267 [details] Screenshot of bug Screen shot of buy
Created attachment 146268 [details] Screenshot of bug Screen shot of buy
I don't understand how this bug is fixed. As shown in the code when I use the auto variable errors appear indicating that it does not know the type. Even when I use a typecast to the type Netbeans does not know the type.
(In reply to christianhgross from comment #16) > I don't understand how this bug is fixed. As shown in the code when I use > the auto variable errors appear indicating that it does not know the type. > Even when I use a typecast to the type Netbeans does not know the type. Please do not reopen this bug because the bug is about "supporting lambda in code model". You complained on concrete bug in code model resolver. Please file another bug with steps to reproduce (or compilable code example).