Problem with iostream clear(), gcc version 3.0 20010223
Craig Rodrigues
rodrigc@mediaone.net
Sat Feb 24 15:21:00 GMT 2001
Hi,
Tested with:
gcc version 3.0 20010223 (prerelease)
Built from the CodeSourcery source rpm under Redhat 7.0.
The following code example:
#include <iostream>
void foo(void)
{
std::cin.clear(5);
}
When compiled, results in the following compiler error:
y.cc: In function `void foo()':
y.cc:6: no matching function for call to `std::basic_istream<char,
std::char_traits<char> >::clear(int)'
/usr/local/include/g++-v3/bits/basic_ios.h:105: candidates are: void
std::basic_ios<_CharT, _Traits>::clear(std::_Ios_Iostate =
std::ios_base::goodbit) [with _CharT = char, _Traits =
std::char_traits<char>]
Can someone help me with this? It looks like a problem in char_traits
somewhere, but I don't know how to track it down.
Thanks.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
More information about the Libstdc++
mailing list