Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-01 16:36:48

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
> From: "David Abrahams" <abrahams_at_[hidden]>
> >
> > I think you could use similar hand-waving to what is used for explicit
> > specialization.
> The precise language used in that "hand-waving" is important, because it
> may open the door to much more 'evil' examples than that swap(b, d)
> thing.

You have been prescient on this issue, so I won't argue. But I'd like to see
examples of what you have in mind.

> > > 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 don't think so. Full specialization is just a special case of
> partial
> > specialization. The dangerous syntax lies along the continuum of the
> > technique you are proposing people should use.
> Sorry, I lost you there. Full specialization is a special case of
> partial specialization. What does this prove?

Only that perhaps the example is /not/ a non-issue. I think we need to
answer the questions posed (or implied) by LWG226, namely, "what is the best
way to do this? How are the writers and teachers among us going to recommend
that it be done?" If we recommend (partial) specialization, there will be
cases (perhaps a majority) which admit the dangerous syntax that you want to
deprecate. There's a lot to remember and get right in "template<class T>
void f<T*>(T*)"; maybe overloading would be a more reliable and easy-to-use


Boost list run by bdawes at, gregod at, cpdaniel at, john at