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.
C++11 sample: #include <functional> #include <iostream> using namespace std; void f(int a1, int a2, int a3) { std::cout << "Arg1 = " << a1 << endl; std::cout << "Arg2 = " << a2 << endl; std::cout << "Arg3 = " << a3 << endl; } int main() { function<void(int)> bf = bind(f, placeholders::_1, 0, 0); bf(1); bf(2); bf(3); return 0; } Problems: 1) bf has "Unused variable" sign 2) Find Usages can not find bf(1), bf(2), bf(3) 3) Rename doesn't work. Such message appears: "Cannot modify element in read only or library file: "functional"."
This sample can be compiled via Oracle Solaris Studio too: #include <functional> #include <iostream> using namespace std; void scan(int length, std::function<void()> process ) { for(int i=0; i<length; i++) { process(); } } int main() { std::function<void()> lll = []()->void { cout << "ok" << endl; }; scan(10, lll); lll(); return 0; }