Description of problem: Eclipse fails to resolve c++11 symbols like shared_ptr, it poses no problem during compilation though. Version-Release number of selected component (if applicable): devtoolset-4-eclipse-cdt-8.7.0-8.el7.x86_64 How reproducible: Always Steps to Reproduce: 1.Create new c++ plus project write word shared_ptr 2.Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build-in Compiler Settings in the text box entitled Command to get compiler specs append -std=c++11 3.Rebuild project, index Actual results: Codepad shows Symbol `shared_ptr` could not be resolved. Expected results: Should show no such messages Additional info:
Jeff, would you please investigate? This is major usecase we have to support.
(In reply to Alexander Kurtakov from comment #1) > Jeff, would you please investigate? This is major usecase we have to support. The code is working, but it needs some help to make it index properly. From: http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support First, one needs to go to: Project->Properties->Preprocessor Include Paths->Providers and click on the CDT GCC Built-in Compiler Settings Underneath, unselect "Use global provider shared between projects" and in the Command string for finding built-ins, add: -std=c++0x For the project, go to Project->Properties->C/C++ Build->Settings->Dialect and choose c++0x from the drop-down. Rebuild your index if it already showing failure or build as usual. I am using devtoolset-4-eclipse-cdt-8.8.1-9.2.el6-x86_64 and with the aforementioned changes, I am able to parse the following code fine: #include <iostream> #include <memory> using namespace std; int main( shared_ptr<int> sp(new int(5)); cout << *sp; return 0; }
verified in devtoolset-4-eclipse-cdt-8.8.1-9.3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1145