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

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.2.0
    • 4.3.0
    • 24. Iterators
    • None
    • Patch Available
    • 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

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

            Dates

              Created:
              Updated: