stl_iterator.h (istream_iterator::operator->): Fix return values.
authorBenjamin Kosnik <bkoz@redhat.com>
Tue, 26 Jun 2001 09:41:53 +0000 (09:41 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Tue, 26 Jun 2001 09:41:53 +0000 (09:41 +0000)
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

* include/bits/stl_iterator.h (istream_iterator::operator->): Fix
return values.
(istream_iterator::operator*): Same.

2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Petit-Bianco  <apbianco@redhat.com>

        * testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
        is on 41st, not 14th.

Co-Authored-By: Alexandre Petit-Bianco <apbianco@redhat.com>
From-SVN: r43574

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/21_strings/element_access.cc

index 0920104d9e2b73adbfb34efdd2bbb35a6c3af396..73d26c9cc50b752baa277507ca1e05b7dc9b635e 100644 (file)
@@ -1,3 +1,15 @@
+2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/bits/stl_iterator.h (istream_iterator::operator->): Fix
+       return values.
+       (istream_iterator::operator*): Same.
+
+2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
+            Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+        * testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
+        is on 41st, not 14th.
+
 2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/bits/std_iterator.h: Include sbuf_iter.h via std_ios.h.
index a50b3536811b38e0ae0e98bc9bd7094c806b9e09..d46efa7fd008754be7f300462370a8ea079f6578 100644 (file)
@@ -295,10 +295,10 @@ namespace std
       istream_iterator() : _M_stream(0), _M_ok(false) {}
       istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
 
-      reference 
+      const _Tp&
       operator*() const { return _M_value; }
 
-      pointer 
+      const _Tp*
       operator->() const { return &(operator*()); }
 
       istream_iterator& 
index 4deabda1b7b8047720294578891c9a4d452cbad0..88b10a22cc72c37abe6d0699275e959f4b2c597c 100644 (file)
@@ -34,7 +34,7 @@ bool test01(void)
   csize_type csz01, csz02;
 
   const std::string str01("tamarindo, costa rica");
-  std::string str02("14th street beach, capitola, california");
+  std::string str02("41st street beach, capitola, california");
   std::string str03;
 
   // const_reference operator[] (size_type pos) const;
@@ -49,7 +49,7 @@ bool test01(void)
   ref ref1 = str02[csz02 - 1];
   VERIFY( ref1 == 'a' );
   ref ref2 = str02[1];
-  VERIFY( ref2 == '4' );
+  VERIFY( ref2 == '1' );
 
   // const_reference at(size_type pos) const;
   csz01 = str01.size();