Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-612

many iterator types do not work with types that implement unary operator&

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.3.0
    • Component/s: 24. Iterators
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      Code that uses the macro _RWSTD_OPERATOR_ARROW will be affected by this issue. Code that has '&*' is also very likely to be affected.

      #include <deque>
      #include <iterator>
      #include <list>
      #include <set>
      #include <vector>

      struct S
      {
      void operator& () const {};
      };

      int main ()
      {
      // this is just a compile test, it is not intended to run

      std::reverse_iterator<S*>().operator->();
      std::set<S>::iterator().operator->();
      std::deque<S>::iterator().operator->();
      std::list<S>::iterator().operator->();

      return 0;
      }

        Attachments

        1. operator_arrow.patch
          9 kB
          Farid Zaripov

          Activity

            People

            • Assignee:
              farid Farid Zaripov
              Reporter:
              vitek Travis Vitek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: