This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: matching function for ipfx in gcc 3.4.2
> In my existing code I am using the *ipfx* function of the istream
> present in the iostream.h file.
>
> But I can't find this function in this version of gcc 3.4.2. Its giving
> the following error.
>
> error: 'struct std::basic_istream<char, std::char_traits<char> >' has no
> member named 'ipfx'
Right. It's not there by design.
This function is not actually part of C++ standard iostreams.
> Can u help me in finding a matching function in this version?
>From 2.95.3, it looks like this function did:
int ipfx(int need = 0) {
if (!good()) { set(ios::failbit); return 0; }
else {
_IO_flockfile(_strbuf);
if (_tie && (need == 0 || rdbuf()->in_avail() < need)) _tie->flush();
if (!need && (flags() & ios::skipws)) return _skip_ws();
else return 1;
}
}
int ipfx0() { // Optimized version of ipfx(0).
if (!good()) { set(ios::failbit); return 0; }
else {
_IO_flockfile(_strbuf);
if (_tie) _tie->flush();
if (flags() & ios::skipws) return _skip_ws();
else return 1;
}
}
You'll have to use something equivalent, but standards conforming,
when you port.
-benjamin