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.
Similar to bug #215662 but inside a for loop The following works: for (Foo *p : v) { p->bar(); } This does not for (auto p : v) { p->bar(); } Gcc 4.7 is able to compile it and it can run from netbeans
fixed: http://hg.netbeans.org/cnd-main/rev/928fe71ed0c0
Integrated into 'main-golden', will be available in build *201210191216* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/928fe71ed0c0 User: Nikolay Krasilnikov <nnnnnk@netbeans.org> Log: fixed #218848 - auto in for loop produces not recognized
This works for me (In reply to comment #2) > Integrated into 'main-golden', will be available in build *201210191216* on > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) > Changeset: http://hg.netbeans.org/main-golden/rev/928fe71ed0c0 > User: Nikolay Krasilnikov <nnnnnk@netbeans.org> > Log: fixed #218848 - auto in for loop produces not recognized
Created attachment 143859 [details] Screenshot
NetBeans IDE 7.4 (Build 201310111528) Linux version 3.8.0-35 Still receive "Unable to receive identifier...": std::vector< std::vector<float> > vectors; for (auto &vector : vectors) { float *pointer = vector.data(); // Unable to resolve identifier data. int *size = vector.size(); // Unable to resolve identifier size. } Explicitly specifying the type resolve bug: std::vector< std::vector<float> > vectors; for (std::vector<float> &vector : vectors) { float *pointer = vector.data(); // Unable to resolve identifier data. int *size = vector.size(); // Unable to resolve identifier size. } Both examples compile successfully.
Works in nightly build. If for some reason it won't work for you, please, reopen bug and provide info about your compiler.