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.
Created attachment 147492 [details] Sample C++11 code that illustrates bugs Several things in C++11 do not seem to be correctly recognized by the Netbeans Code Assistance, and will result in unresolved identifier messages, although the code will still compile cleanly. Sometimes, explicitly reparsing the project will resolve many of these issues, but for certain cases, no amount of reparsing will make the errors go away. I've supplied a modest full working example class that illustrates all of the problems, with inline comments indicating where code assistance seems to consistently fail. I figured a full working example would be helpful because it illustrates not only exactly what parts do not work, but also reveals some inconsistency in how particular features work. 1) Code assistance refuses to recognize the .target() method of std::function. In fact, none of std::function's members or types seem to be visible to it. 2) Templated classes declared as friends do not always seem to be able to access private or protected data members... although this is inconsistent - in some cases, it works and in others it does not. There are examples of both in the attached code sample. The case where it does not work is indicated by a comment in the attached code. 3) Declaring variables in a lambda that is being passed to a constructor which takes an std;:function seems to result in unresolved identifier messages. With C++11 enabled, the code fragment I've attached compiles as expected, but Netbeans code assistance stiil insists that the above are errors. I am using Netbeans 8.0 on Linux, and am using gcc 4.8.2
Several code model failures
Integrated into 'main-silver', will be available in build *201408100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/af8d29c3d430 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #244777 - Code assistance sometimes flags valid C++11 as errors
Fixed in http://hg.netbeans.org/cnd-main/rev/af8d29c3d430 and http://hg.netbeans.org/cnd-main/rev/548829bab5a0
Integrated into 'main-silver', will be available in build *201408120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/548829bab5a0 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Additional fix for #244777 - Code assistance sometimes flags valid C++11 as errors -- added restoring of lambdas declared inside initializers
Integrated into 'releases/release801', will be available in build *201409171118* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/cd243a95be94 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #244777 - Code assistance sometimes flags valid C++11 as errors (transplanted from af8d29c3d4307013f5cfcbfeed5cfd79bde4c93a)
Verified in NetBeans 8.0.1 patch1 ------------------------------------------------------------------------------- >Log Session: Thursday, September 18, 2014 2:47:00 PM MSK >System Info: Product Version = NetBeans IDE 8.0.1 (Build 201409180010) (#ef6e99d0c0db) Operating System = SunOS version 5.11 running on amd64 Java; VM; Vendor = 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.8.0_05-b13 Java Home = /usr/jdk/instances/jdk1.8.0/jre System Locale; Encoding = en (nb); UTF-8