fpos.h (fpos::operator-): Don't return reference, return original, non-modified version.
2001-06-12 Benjamin Kosnik <bkoz@redhat.com> * include/bits/fpos.h (fpos::operator-): Don't return reference, return original, non-modified version. (fpos::operator+): Same. * testsuite/27_io/fpos.cc: Add test. [[Split portion of a mixed commit.]] From-SVN: r43290.2
This commit is contained in:
parent
7f3e3e0a22
commit
9aaa9ee026
@ -3,7 +3,8 @@
|
||||
* include/bits/fpos.h (fpos::operator-): Don't return reference,
|
||||
return original, non-modified version.
|
||||
(fpos::operator+): Same.
|
||||
|
||||
* testsuite/27_io/fpos.cc: Add test.
|
||||
|
||||
2001-06-12 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
libstdc++/2071
|
||||
|
@ -107,12 +107,18 @@ void test02()
|
||||
pos03 = pos03 + off02;
|
||||
pos04 += off02;
|
||||
VERIFY( pos03 == pos04 );
|
||||
std::streampos pos05 = pos03;
|
||||
std::streampos pos06 = pos03 + off02;
|
||||
VERIFY ( pos05 == pos03 );
|
||||
|
||||
// q = p - o
|
||||
// p -= o
|
||||
pos03 = pos03 - off02;
|
||||
pos04 -= off02;
|
||||
VERIFY( pos03 == pos04 );
|
||||
std::streampos pos07 = pos03;
|
||||
std::streampos pos08 = pos03 - off02;
|
||||
VERIFY ( pos07 == pos03 );
|
||||
|
||||
// o = p - q
|
||||
VERIFY( 0 == pos03 - pos04 );
|
||||
|
Loading…
Reference in New Issue
Block a user