Why list objects with static members not accessible during debug
- 
wrote on 28 Jun 2017, 17:41 last edited byHello, I have been struggling to debug a large code using std::list extensively. It seems that objects in a list are not accessible in the debugger using Creator if they contain a static member. I tried various version including the latest 4.3.0. I managed to distil the problem to the below example. As shown in the attached image, objects of Test1 are labelled <not accessible>, whilst Test2 are fine inside the list. Objects outside of the list are accessible independently from having a static member or not. Any help would be greatly appreciated. #include <iostream> #include <list> class Test1 { public: static const int NOPOS=-1; int a; }; class Test2 { public: const int NOPOS=-1; int a; }; int main() { std::list<Test1> list1; Test1 t11; list1.push_back(t11); Test1 t12; list1.push_back(t12); std::list<Test2> list2; Test2 t21; list2.push_back(t21); Test2 t22; list2.push_back(t22); return 0;
- 
Hi, Sounds like you may have found something. Which version of Qt are you running ? On what OS ? 
- 
Hi, Sounds like you may have found something. Which version of Qt are you running ? On what OS ? wrote on 30 Jun 2017, 07:20 last edited byHi, It is the latest creator 4.3.0. I tried it with Qt5.3.1 and 5.9.1 so I assume all version in between at least. The OS is Win10. 
- 
Did you also check with Qt Creator 4.3.1 
- 
wrote on 1 Jul 2017, 22:37 last edited byI have now. It was not out when I did the original test. Anyway with Creator 4.3.1 it seems to be OK independently from the compiler or Qt version. I guess this solves it. Thanks for pointing out. 
1/5
 
