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.

Qt Code:
  1. #include <iostream>
  2. #include <list>
  3.  
  4. class Test1
  5. {
  6. public:
  7. static const int NOPOS=-1;
  8. int a;
  9. };
  10.  
  11. class Test2
  12. {
  13. public:
  14. const int NOPOS=-1;
  15. int a;
  16. };
  17.  
  18. int main()
  19. {
  20. std::list<Test1> list1;
  21. Test1 t11;
  22. list1.push_back(t11);
  23. Test1 t12;
  24. list1.push_back(t12);
  25.  
  26. std::list<Test2> list2;
  27. Test2 t21;
  28. list2.push_back(t21);
  29. Test2 t22;
  30. list2.push_back(t22);
  31.  
  32. return 0;
  33. }
To copy to clipboard, switch view to plain text mode 

debug.jpg