From 0a33edd21d3ef719f089d63afc59bc2870d218dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Thu, 12 Sep 2002 20:50:10 +0000 Subject: [PATCH] workaround for isspace and metrowerks [SVN r15277] --- include/boost/tuple/tuple_io.hpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/boost/tuple/tuple_io.hpp b/include/boost/tuple/tuple_io.hpp index 2869ff3..82849d9 100644 --- a/include/boost/tuple/tuple_io.hpp +++ b/include/boost/tuple/tuple_io.hpp @@ -36,6 +36,16 @@ #include "boost/tuple/tuple.hpp" +// This is ugly: one should be using twoargument isspace since whitspace can +// be locale dependent, in theory at least. +// not all libraries implement have the two-arg version, so we need to +// use the one-arg one, which one should get with but there seem +// to be exceptions to this. + +#include // for two-arg isspace +#include // for one-arg (old) isspace +#include // Metrowerks does not find one-arg isspace from cctype + namespace boost { namespace tuples { @@ -328,7 +338,11 @@ extract_and_check_delimiter( { const char d = format_info::get_manipulator(is, del); - const bool is_delimiter = (!isspace(d) ); +#if defined (BOOST_NO_STD_LOCALE) + const bool is_delimiter = !isspace(d); +#else + const bool is_delimiter = (!std::isspace(d, is.getloc()) ); +#endif char c; if (is_delimiter) { @@ -415,7 +429,11 @@ extract_and_check_delimiter( { const CharType d = format_info::get_manipulator(is, del); - const bool is_delimiter = (!isspace(d) ); +#if defined (BOOST_NO_STD_LOCALE) + const bool is_delimiter = !isspace(d); +#else + const bool is_delimiter = (!std::isspace(d, is.getloc()) ); +#endif CharType c; if (is_delimiter) {