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 145893 [details] screenshot showing the occuring errors Some c++11 features are treated as errors by netbeans (see attached screenshot). So far I detected the following: Use of std::array yields 'unable to resolve identifier' error. Use of std::stof and std::stoi yield 'unable to resolve identifier' errors. The project compiles and runs fine (by using the hammer button) but netbeans shows error markers in the editor. However, many c++11 keywords are recognized, I have no problems with nullptr, override for example. c++11 standard is set for code assistance in the project properties. I use NB 7.4 but also tried it with 8 RC, the issue also exists in NB 8 RC. I use gcc 4.8.1 but I don't think this matters, since it compiles fine.
Simple test case: // Code model is broken here struct array { void swap(array& __other) noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) { std::swap_ranges(begin(), end(), __other.begin()); } // Iterators. iterator begin() noexcept { return iterator(data()); } };
I don't know if such information is useful, but I just observed that calling std::move() is also not recognized.
Fixed in http://hg.netbeans.org/cnd-main/rev/eb97345becf7 (comment in the commit is wrong)
Hey you are so incredibly fast! I just got a nightly build and tested it. Now all these errors are gone. Thank you a lot!
You are welcome ;)
I don't know if I should reopen or file a new bug report. Even though this problem seems to be solved for the case when creating a new "C++ Application" using the wizard (and leaving everything to default), I still encounter the issue when importing my own project (which uses cmake). After importing, the IDE says that everyting is ok, it compiles and runs fine and code assistance works. There are no red error markers and I can ctl+click to keywords like 'std::shared_ptr' and 'std::array' to hyperlink to the definitions. However, after restarting the IDE, all error markers (as described in the initial post) are back and ctl+click doesn't work any more :( I can still compile and run the project. Am I doing something wrong? Is this maybe because of cmake?
Sorry, haven't look on emails from netbeans for a while. First of all, you should check if this still is valid after deleting cache directory. If the problem won't gone, please, post another bug. (Obviously, it is not bug with grammar or semantic resolving)
*** Bug 243506 has been marked as a duplicate of this bug. ***
@petrk: The std::shared_ptr bug is still a problem for me with Netbeans 8.0.2 under Ubuntu. cache has been deleted. The project is a Cmake project (https://github.com/SebastianNiemann/OnlineOptimisation/tree/master).
(In reply to wlfbck from comment #9) > @petrk: The std::shared_ptr bug is still a problem for me with Netbeans > 8.0.2 under Ubuntu. cache has been deleted. The project is a Cmake project > (https://github.com/SebastianNiemann/OnlineOptimisation/tree/master). I downloaded NetBeans 8.0.2 right now and do not see any problems with std::shared_ptr. Please, provide more details on your issue. I'm using Ubuntu too, gcc version is 4.8.1
I had the same issue now (Ubuntu 15.10, Netbeans 8.0.2 for C/C++) and problem is in constant __cplusplus=199711L. It's value must be at least 201103L and you can change it in Tools -> Options -> C/C++ -> Code Assistance -> C++ -> Macro Definitions.
(In reply to porwolikt from comment #11) > I had the same issue now (Ubuntu 15.10, Netbeans 8.0.2 for C/C++) and > problem is in constant __cplusplus=199711L. It's value must be at least > 201103L and you can change it in Tools -> Options -> C/C++ -> Code > Assistance -> C++ -> Macro Definitions. I know it's like 2 years since this comment but this bug still apeared in 2017. Anyway your solution worked on Version: NetBeans IDE 8.2 (Build 201705191307) Thanks!