From 3f452717cf0e8dcecf9ddc6311fa2d2a06cf9444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Terje=20Sletteb=C3=B8?= Date: Fri, 14 Mar 2003 20:17:47 +0000 Subject: [PATCH] no message [SVN r17921] --- include/boost/lexical_cast.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index 3a248f1..ff295be 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -10,7 +10,8 @@ // who: contributed by Kevlin Henney, // enhanced with contributions from Terje Slettebų, // with additional fixes and suggestions from Gennaro Prota, -// Beman Dawes, Dave Abrahams, Daryle Walker, and other Boosters +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// and other Boosters // when: November 2000, March 2003 #include @@ -148,12 +149,17 @@ namespace boost } bool operator>>(std::string &output) { - return std::getline(stream, output, char_type()).eof(); + #if defined(BOOST_NO_STRINGSTREAM) + stream << '\0'; + #endif + output = stream.str(); + return true; } #ifndef DISABLE_WIDE_CHAR_SUPPORT bool operator>>(std::wstring &output) { - return std::getline(stream, output, char_type()).eof(); + output = stream.str(); + return true; } #endif private: