Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-02-13 07:01:47


> >The two defects are:
> >The various std::isdigit, islower, isalnum etc. convenience functions
> >will not compile.
>
> Please could you post a concrete example?

#include <locale>

int main()
{
  return std::isupper('c', std::locale()); // error overload not found.
}

but can be fixed with:

#include <locale>

namespace std{
using stlport::isupper;
}

int main()
{
  return std::isupper('c', std::locale()); // OK got it now
}

I'm not sure if this is due to a compiler bug or what, but basically it's
due to the way that STLport is set up: the names are declared in namespace
stlport (which is an alias for either _STL or _STLD depending upon the
build), and then imported into std with:

namespace std{
using namespace stlport;
}

in STLports _suffix.h. This works fine for most cases, but not when the
name is already present in namespace std (as is the case with the is*
functions for example).

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk