Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-07-14 02:16:21

I'm trying to tweak a couple of tests so that they pass with STLPort 5.0.

A part of the test has to be run differently for this platform and I want
to detect which version of STLPort I'm running on.

Here is the part of the test. This works for STL 4.5.3 but for
STLPort 5.0 it doesn't. When I look in config it looks like
I should be using
// at least one library - MSL notes: it doesn't make much sense

// to implement the == operator for hash collections - but goes ahead

// does it anyway even though it doesn't seem to work. So sort into

// vectors and then compare. Currently, it seems that STLPort versions

// greater than 5.0 don't support the == operator on hashed sets

#if !defined(_STLPORT_VERSION) || (_STLPORT_VERSION < 0x500)

BOOST_CHECK(ahash_map == ahash_map1);


std::vector< std::pair<random_key, A> > tvec, tvec1;

std::copy(ahash_map.begin(), ahash_map.end(), std::back_inserter(tvec));

std::sort(tvec.begin(), tvec.end());

std::copy(ahash_map1.begin(), ahash_map1.end(), std::back_inserter(tvec1));

std::sort(tvec1.begin(), tvec1.end());

BOOST_CHECK(tvec == tvec1);


When I look at config infoSTLPort standard library version 0x510 I see

    __SGI_STL_PORT =0x510
    __STL_DEBUG =1
    _STLP_DEBUG =1
    _STLP_LONG_LONG =long long
    _STLP_OWN_IOSTREAMS [no value]
    _STLP_USE_NEW_C_HEADERS [no value]
    __GLIBCXX__ =20051201
    _GLIBCXX_USE_C99 =1

So it looks like I should have something like:

#if !defined__SGI_STL_PORT) || (__SGI_STL_PORT < 0x500)

But I'm not sure how this would work with STLPort 4.5.3

What should I be doing.

Robert Ramey

Boost list run by bdawes at, gregod at, cpdaniel at, john at