Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14922

std::map<int, float>::iterator "not accessible"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.0.0
    • Qt Creator 3.5.0
    • Debugger
    • None
    • Windows 7 64 bit
      Qt 5.4.2, Qt 5.5.0
      MinGW g++ 4.9.1
      gdb 7.8

    Description

      1. Let the debugger stop at a breakpoint behind this code:
                typedef std::map<int, float> Map;
                Map map;
                map[11] = 11.0;
                map[22] = 22.0;
                map[33] = 33.0;
                map[44] = 44.0;
                map[55] = 55.0;
                map[66] = 66.0;
        
                Map::iterator it1 = map.begin();
                Map::iterator it2 = it1; ++it2;
                Map::iterator it3 = it2; ++it3;
                Map::iterator it4 = it3; ++it4;
                Map::iterator it5 = it4; ++it5;
                Map::iterator it6 = it5; ++it6;
        

        (taken from void testStdMapUIntFloatIterator() in simple.pro)

      2. Check the iterators in Locals and Expressions view.
        They only display an address. When you expand them, this turns to "not accessible" and a member "[0]" without a value appears.

      Instead, the map items the iterators point to should be displayed.

      Attachments

        1. left.log
          6 kB
        2. right.log
          62 kB

        Activity

          People

            hjk hjk
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: