Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-05-23 07:23:25


----- Original Message -----
From: "John Maddock" <john_maddock_at_[hidden]>

> > Yes! Did you test with STLPort? boost/detail/iterator.hpp is making the
> > assumption that they're mutually exclusive.
> > I can work around it for this one file, but what could the possible
> > justification be for enabling BOOST_MSVC_STD_ITERATOR with STLPort?
It's
> > supposed to mean
>
> The ublas guys wanted it - std::iterator is the basically the same with
or
> without STLport on MSVC isn't it?

No. I can find no similarity whatsoever in those two definitions of
iterator.

> I do know that reverse_iterator differs a
> lot, but I think that array was the only use for that case and that
tested
> OK, as did utility/iterator_test.cpp when I tried it. However if it's
> causing problems disable it again, and let the ublas guys find some other
> workaround.

Please! And next time I think it would be good to at least give a public
heads-up before we change the meaning of a configuration flag, since the
consequences can be so far-reaching.

> > "Microsoft's broken version of std::iterator is being used. This
> > implies that std::iterator takes no more than two template parameters,
and
> > that std::reverse_iterator takes at least two template parameters."
> >
> > And that's clearly false with STLPort.
>
> Maybe we need BOOST_STLPORT_ITERATOR for the non-standard STLport
version,
> but we've got enough macros already :-(

The only non-standard part of the STLPort+MSVC version is this
specialization, which I think we can just check for by looking for
__SGI_STL_PORT:

    template <>
    struct iterator<output_iterator_tag, void, void, void, void>
    {
        typedef output_iterator_tag iterator_category;
    };

-Dave


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