Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-11-06 09:42:13


From: "Alan Griffiths" <boost_at_[hidden]>

> /2/ Allow overloading

[...]

> However Peter Dimov has recently indicated the fragility of the approach
> (including the following example):
>
> #include <set> // Presumably <algorithm> intended - AG

The idea was that entities in this translation unit depend on <set>, and on
the library implementation where this code was written <set> happened to
make the original std::swap visible, so the error went unnoticed.

(Of course <set> is only an example.)

When the code is ported to another implementation, it will silently change
behaviour.

> /3/ Allow partial specialisation of function templates

[...]

> Peter's examples do highlight a need for care - but that is inherent to
> the existing language. Also, given the demonstrable fragility of the
> other approaches that clearly doesn't rule this solution out.

Being the author of the proposal about /3/ I most definitely wouldn't want
to rule this solution out. :-)

--
Peter Dimov
Multi Media Ltd.

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