Limited member function templates?
Janice Caron
caron800 at googlemail.com
Fri Nov 9 23:47:30 PST 2007
On 11/10/07, Janice Caron <caron800 at googlemail.com> wrote:
> On 11/10/07, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
> > The only thing you can't have is _virtual_ member function templates.
> > Is making them virtual what you are talking about?
>
> All member functions in D are virtual (unless you explicitly use the
> "final" keyword). So obviously, yes.
When we get the common calling convention whereby f(x) and x.f() are
interchangable, then adding non-polymorphic template functions will be
a piece of cake.
Just declare as f(T)(X x, T t) { ... } and call as x.f(t).
Maybe that will be enough. But yeah - I intended to mean "normal"
functions. Polymorphic. Virtual.
More information about the Digitalmars-d
mailing list