Problem with iostream clear(), gcc version 3.0 20010223

Craig Rodrigues rodrigc@mediaone.net
Sat Feb 24 18:00:00 GMT 2001


On Sat, Feb 24, 2001 at 08:20:11PM -0500, Phil Edwards wrote:
> On Sat, Feb 24, 2001 at 06:21:09PM -0500, Craig Rodrigues wrote:
> >  
> >       std::cin.clear(5);
> 
> clear() takes a variable of type iostate.
> 
> 5 is not of type iostate.
> 
> What's the problem?

I might have misrepresented my case.  I am trying to compile a third
party library, and have hit some iostreams compilation problem that
only started hitting with this week's gcc snapshots (ie. it compiled
with last week's gcc).  I tried to isolate
the problem by giving that particular test case.

The actual code has an object (named server) which inherits from iostream.
On the server object, clear() is invoked with:
server.clear(0);

This is causing compilation problems.
I am also getting a lot of template instantiation problems associated
with iostreams that I was not getting last week.

The compiler error messages are here:
http://www.gis.net/~craigr/gcc_error/IOStream.error.txt

and the preprocessed output is here:
http://www.gis.net/~craigr/gcc_error/IOStream_Test.ii.bz2 

I am getting a lot of compiler error messages like:
/opt2/home/craigr/ACE_wrappers/ace/IOStream_T.h:151: no matching function for 
   call to `std::basic_iostream<char, std::char_traits<char> 
   >::operator>>(signed char&)'
/usr/local/include/g++-v3/bits/std_istream.h:92: candidates are: 
   std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, 
   _Traits>::operator>>(std::basic_istream<_CharT, 
   _Traits>&(*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, 
   _Traits = std::char_traits<char>]
/usr/local/include/g++-v3/bits/std_istream.h:95:                 
   std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, 
   _Traits>::operator>>(std::basic_ios<_CharT, 
   _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits 
   = std::char_traits<char>]

I'm not sure how to track it down, because I'm not familiar enough
with iostreams.

Thanks.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          



More information about the Libstdc++ mailing list