|
Boost : |
From: Christian Engström (christian.engstrom_at_[hidden])
Date: 2004-02-21 14:48:18
>>> Christian Engström <christian.engstrom_at_[hidden]> writes:
>>>, all of the STL algorithms can be used without restriction."
>>
>> "David Abrahams" <dave_at_[hidden]> wrote in message
>>False. They are allowed to contain concept checks that cause
>>compilation to fail if you pass them non-conforming iterators.
>
> Jeff Flinn wrote:
> I just ran into this moving a project from VC6.5 to VC7.1, where home-grown
> pre-boost::iterator_adaptors were no longer valid for use with several
> algorithms. It was very easy(and appealing) to replace them with their
> Specialized Adaptor equivalents.
>
> Jeff F
Yes, faulty implementations of underlying components can always be a
problem. I don't know if this was the case in the situation you
describe, but generally speaking, an algorithm that performs concept
checks for concepts that it doesn't actually need is just that: faulty.
So if (which has not been shown, but anyway) there are algortithm
implementations that would not accept proxy_iterator:s because they do
over-reaching pre-condition testing, this is a problem with that
algorithm, not with the proxy_iterator.
But I agree, it's a point well worth keeping in mind, that since the
proxy package is designed in a way that may not coincide with many
people's expectations, it may possibly run a higher than normal risk of
triggering latent bugs in various third-party components.
/Christian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk