mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 22:51:06 +08:00
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. From-SVN: r43287
This commit is contained in:
parent
695ac33fac
commit
7f3e3e0a22
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
2001-06-12 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
libstdc++/2071
|
||||
@ -32,7 +38,7 @@
|
||||
* config/os/solaris/solaris2.7/bits/os_defines.h
|
||||
(_GLIBCPP_AVOID_FSEEK): Likewise.
|
||||
|
||||
2001-06-12 Benjamin Kosnik <bkoz@redhat.com>
|
||||
2001-06-12 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Change to
|
||||
AC_TRY_COMPILE, so that the built compiler is checked, and
|
||||
|
@ -52,8 +52,8 @@ namespace std
|
||||
typedef _StateT __state_type;
|
||||
|
||||
private:
|
||||
__state_type _M_st;
|
||||
streamoff _M_off;
|
||||
__state_type _M_st;
|
||||
|
||||
public:
|
||||
__state_type
|
||||
@ -64,10 +64,10 @@ namespace std
|
||||
|
||||
// NB: The standard defines only the implicit copy ctor and the
|
||||
// previous two members. The rest is a "conforming extension".
|
||||
fpos(): _M_st(__state_type()), _M_off(streamoff()) { }
|
||||
fpos(): _M_off(streamoff()), _M_st(__state_type()) { }
|
||||
|
||||
fpos(streamoff __off, __state_type __st = __state_type())
|
||||
: _M_st(__st), _M_off(__off) { }
|
||||
: _M_off(__off), _M_st(__st) { }
|
||||
|
||||
operator streamoff() const { return _M_off; }
|
||||
|
||||
@ -77,18 +77,20 @@ namespace std
|
||||
fpos&
|
||||
operator-=(streamoff __off) { _M_off -= __off; return *this; }
|
||||
|
||||
fpos&
|
||||
fpos
|
||||
operator+(streamoff __off)
|
||||
{
|
||||
fpos t(*this);
|
||||
return t += __off;
|
||||
fpos __t(*this);
|
||||
__t += __off;
|
||||
return __t;
|
||||
}
|
||||
|
||||
fpos&
|
||||
fpos
|
||||
operator-(streamoff __off)
|
||||
{
|
||||
fpos t(*this);
|
||||
return t -= __off;
|
||||
fpos __t(*this);
|
||||
__t -= __off;
|
||||
return __t;
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user