Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-11-01 15:05:16


From: "David Abrahams" <abrahams_at_[hidden]>

> > "Additional functionality" as in "letting bugs go undetected?" :-)
The
> > language may be interpreted to allow this, granted, but is this what
we
> > want?
>
> I think we may be looking at a specific example here which helps prove
your
> point (one could argue that code which uses std::swap(a, b) should
> concept-check a and b to be sure they're the same type), but that a
broad
> look at the need for specialization/overloading in general may tip the
> balance the other way. Just speculating, though.

Once you allow std:: overloads, many more such examples can be
constructed. And I wonder how exactly you'd constrain those overloads to
match the primary template in functionality, whatever the definition of
"match."

> > Only if you use the "feature" of not providing the template
parameters
> > explicitly. This should be deprecated. And banned. :-)
>
> Maybe. But you must appreciate that getting FTPS to work reliably for
users
> requires not only radical changes in the core language but also in
levels of
> user education and practice.

Granted, but note that the problems are not limited to partial
specializations. They are already there. In particular, the partial
specialization syntax doesn't allow omitting the template parameters, so
your example is a non issue.

I think that in general every problem with partial specializations
applies to explicit specializations as well. Except the ambiguity
between two partial specializations, of course, but it is already in the
language (limited to class templates) so it's not a new thing either.

--
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