Community
Participate
Working Groups
Build Identifier: Build id: 20110218-0911 The function that is broken in the C++ IDE is (in the text editor) selecting a C++ class function declaration in the header file (.h), hitting F3 and expecting to go to the function declaration in the implementation (.cpp) file. This "go to declaration" doesn't work if the function either: - returns std::string, or - has argument of std::string What is interesting is that if I typedef the std::string to eg stdstring, the "go to declaration" feature works. Reproducible: Always Steps to Reproduce: ------------------ 1.Create header file containing class... #ifndef TESTCLASS_H_ #define TESTCLASS_H_ #include <string> using namespace std; typedef std::string stdstring; class testClass { public: testClass(); virtual ~testClass(); void f3_works_a(stdstring a); void f3_doesntwork_b(std::string b); void f3_doesntwork_c(string c); stdstring f3_works_d(); std::string f3_doesntwork_e(); string f3_doesntwork_f(); }; #endif /* TESTCLASS_H_ */ ------------------ 2. Create implementation file containing #include "testClass.h" testClass::testClass(){} testClass::~testClass(){} void testClass::f3_works_a(stdstring a){} void testClass::f3_doesntwork_b(std::string b){} void testClass::f3_doesntwork_c(string c){} stdstring testClass::f3_works_d(){} std::string testClass::f3_doesntwork_e(){} string testClass::f3_doesntwork_f(){} ------------------ 3. For each function in the header file, select and hit F3 You will see that "go to declaration" for functions a & d work, and functions b, c, e, f do not work.
They all work for me on Mac OS X 10.6 with GCC 4.2 and Windows 7 with some MinGW GCC 4.4.1. Can you specify your Linux distribution and GCC version? I'll try to reproduce with a similar setup.
Also tried Ubuntu 11.04 with GCC 4.5.2.
I have been able to get the F3 'go to declaration' feature working correctly, for all function types (as described in this bug report). The fix was to: 1. Enable 'Automate discovery of paths and symbols' 2. Clean and rebuild my application 3. Rebuild my index See http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_contribute_to_this_FAQ.3F I was a recent convert from Eclipse Ganymede , which (I suspect) had 'Automate discovery of paths and symbols' enabled by default. I'm happy to therefore close this bug report.