Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-03-02 11:52:50


The recent min max changes have caused breakages with vc7.1 + STLPort, the
problem is that this configuration defines BOOST_NO_STDC_NAMESPACE (because
STLPort doesn't quite manage to import
everything into it's "fake" std namespace), which causes the following code:

template< typename T >
inline T const & std_max( T const & a, T const & b )
{
#if defined(__COMO__) || defined(BOOST_INTEL) ||
defined(BOOST_NO_STD_MIN_MAX)
using std::max;
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::max; // <- error here
#else
using std::max;
#endif
return max BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b );
}

to fail, because min and max *are* in namespace std. Now the thing is,
BOOST_NO_STDC_NAMESPACE was only really designed to check for C lib
functions, it was assumed that std lib functions like min and max are always
in namespace std, are there any situations where that is not the case? If
not we can just ditch the #elif defined(BOOST_NO_STDC_NAMESPACE) clause
altogether.

John.


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