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
This commit is contained in:
parent
0deaa8136a
commit
f4655693b5
3 changed files with 16 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue