|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-01 13:00:04
I am forwarding this discussion to people that I believe are interested in
the outcome, and to the boost list because that is where the issue was
originated. If you don't want to see more of it, please let me know.
----- Original Message -----
From: "David Abrahams" <abrahams_at_[hidden]>
To: "Griffiths, Alan" <Alan.Griffiths_at_[hidden]>
Cc: "Peter Dimov" <pdimov_at_[hidden]>
Sent: Wednesday, November 01, 2000 9:32 AM
Subject: Re: Shades, swap or whatever
> We recognized the problem, then spent a bunch of time trying to figure out
> why partial specialization might be better than allowing overloading.
> Eventually, we came across this case posted by Peter Dimov to c.l.c++.m:
>
> template <class T> void f(T); // #1
> template <> void f<int*>(int*); // #2
> template <class T> void f(T*); // #3
>
> int *x;
> f(x); // which one gets called? #3, surprisingly
>
> It seems to me that the confusion comes from mixing overloading and
> specialization. The two mechanisms don't play well together. Since IMO few
> people have been writing function specializations anyway, and it's a
problem
> we can solve entirely in the LWG without a change to the core language, it
> would be better to allow overloading in std and discourage specialization
of
> function templates.
>
> Core has also discussed this. Some in core thought that it was an obvious
> omission that partial specialization of function templates was not
allowed,
> but eventually they had a problem with this particular proposal because it
> was not always clear from the proposed syntax exactly what might be
> specialized.
>
> ----- Original Message -----
> From: "Griffiths, Alan" <Alan.Griffiths_at_[hidden]>
> To: <abrahams_at_[hidden]>
> Sent: Wednesday, November 01, 2000 4:22 AM
> Subject: Shades, swap or whatever
>
>
> > Re:
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#226
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#229
> >
> > I had a drink with Mark Radford last night an he told me that
> > the library group had discussed this issue. He wasn't clear
> > whether the had been any real progress beyond the ideas
> > discussed in my paper-
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2000/n1252.pdf
> > -on the subject. But he was sure that you were present.
> >
> > Any chance of your summarising the discussion? (And has the
> > discussion extended to core yet?)
> > --
> > Alan Griffiths, Senior Systems Consultant, Experian
> > mailto:alan.griffiths_at_[hidden] tel:+44 115 968 5118
> > http://www.experian.com/ http://www.octopull.demon.co.uk/
> >
> >
> > =======================================================================
> > Information in this email and any attachments are confidential, and may
> > not be copied or used by anyone other than the addressee, nor disclosed
> > to any third party without our permission. There is no intention to
> > create any legally binding contract or other commitment through the use
> > of this email.
> >
> > Experian Limited (registration number 653331).
> > Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk