From: stephan b. <sg...@us...> - 2005-01-06 17:02:47
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17328/include/pclasses/Util Modified Files: LexT.h Log Message: Fix for istream>> op, from Marc. Index: LexT.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Util/LexT.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- LexT.h 28 Dec 2004 15:56:23 -0000 1.4 +++ LexT.h 6 Jan 2005 17:02:37 -0000 1.5 @@ -435,13 +435,7 @@ */ inline std::istream & operator>>( std::istream & is, LexT & a ) { - char c; - // while( std::getline( is, a.str() ).good() ); - // ^^^ eeek! strips newlines! - while( ! is.get(c).eof() ) { - a.str().append( &c ); - } - return is; + return std::getline( is, a.str(), static_cast<std::istream::char_type>(std::istream::traits_type::eof()) ); } |