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

std::reverse_iterator<std::vector<bool>::iterator>::operator-> doesn't compile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
    • Fix Version/s: 4.3.0
    • Component/s: 23. Containers
    • Labels:
      None
    • Environment:

      all

    • Severity:
      Compiler Error

      Description

      Moved from the Rogue Wave bug tracking database:

      ***Created By: sebor @ Jun 23, 2000 04:08:36 PM***
      Subject: vector<bool> operator arrow cannot be explicitly instantiated (908)
      Date: Fri, 23 Jun 2000 16:06:09 -0400
      From: cxxrtl@cxxc.zko.dec.com
      To: OEMSUPPORT@roguewave.com

      /*
      This won't compile. It is from the Perennial test suite.

      cxx: Error: /usr/users/j_ward/BRUCE/include/iterator, line 559: expression
      must be an lvalue or a function designator
      detected during instantiation of
      "std::reverse_iterator<_Iterator>::pointer
      std::reverse_iterator<_Iterator>::operator->() const [with
      _Iterator=std::vector<bool,
      std::allocator<bool>>::iterator]" at line 7 of "t.cxx"
      _RWSTD_OPERATOR_ARROW (pointer operator->() const);
      ----^
      */

      #include <iterator>
      #include <vector>

      void main()
      {
      std::reverse_iterator<std::vector<bool>::iterator>::operator->;
      }

      ***Modified By: sebor @ May 09, 2002 12:00:25 PM***
      With SunPro 5.3 and the latest libstd 3.0:

      SUNWS_CACHE_NAME=t.ti CC -c -D_RWSTDDEBUG -D_RWSTD_MULTI_THREAD -mt -D_RWSTD_POSIX_D10_THREADS -D_RWSTD_USE_CONFIG -I/build/sebor/sunpro-15d/include -I/build2/sebor/dev/stdlib/include -I/build2/sebor/dev/stdlib/../rwtest -I/build2/sebor/dev/stdlib/../rwtest/include -I/build2/sebor/dev/stdlib/tests/include -library=%none -g +w t.cpp
      "/build2/sebor/dev/stdlib/include/rw/_iterator.h", line 153: Error: Cannot return std::vector<bool, std::allocator<bool>>::reference* from a function that should return unsigned*.
      1 Error(s) detected.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebor Martin Sebor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: