Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-12-02 16:54:15


"Peder Holt" <peder.holt_at_[hidden]> wrote

> From what I have seen so far, the only real problem are the
> implementations that define the iterator class inside the container,
> such as dinkumware.

Correct. It is just happens to be used by MSVC...

> GCC 3.2

which is used for testing only, since it supports typeof natively...

> and STLport typedefs global iterator types. In this case, we
> need only register these iterator types.

Correct.

> The iterators in dinkumware luckily have a common base class:
std::iterator<>
> We can exploit this in order to make an implementation of
is_stl_iterator<>
> When it comes to the allocator type, it is used only in generating
> template arguments to the iterator class. Here we can create a dummy
> allocator type that defines the correct typedefs, and we have solved
> the problem.

Can you ellaborate on the "dummy allocator" idea -- I am not sure I
understand it.

> But I agree, it seems impossible to create one unified solution to the
problem.

Correct, even if all the STLs in the world used global iterator templates,
they would use different ones, since it's not in the standard :-(

Arkadiy


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