Commit f4655693 by Benjamin Kosnik Committed by Benjamin Kosnik

stl_iterator.h (istream_iterator::operator->): Fix return values.


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
parent 0deaa813
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.
* include/bits/stl_iterator.h (istream_iterator): Inherit from
......
......@@ -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&
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment