From e331fc2a21731d6534024cb0c64cdce7d73752bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20M=2E=20L=C3=B3pez=20Mu=C3=B1oz?= Date: Mon, 20 Jun 2005 10:54:07 +0000 Subject: [PATCH] workaround for GCC 2.9x lacking std::char_traits<>::eof() [SVN r29703] --- include/boost/lexical_cast.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index f805f68..8e07fda 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -154,7 +154,16 @@ namespace boost { return !is_pointer::value && stream >> output && - stream.get() == std::char_traits::eof(); + stream.get() == +#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) +// GCC 2.9x lacks std::char_traits<>::eof(). +// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3 +// configurations, which do provide std::char_traits<>::eof(). + + EOF; +#else + std::char_traits::eof(); +#endif } bool operator>>(std::string &output) {